~ubuntu-branches/ubuntu/precise/torque/precise-updates

« back to all changes in this revision

Viewing changes to src/resmom/solaris5/mom_start.c

  • Committer: Bazaar Package Importer
  • Author(s): Dominique Belhachemi
  • Date: 2010-05-17 20:56:46 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100517205646-yjsoqs5r1s9xpnu9
Tags: upstream-2.4.8+dfsg
ImportĀ upstreamĀ versionĀ 2.4.8+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
#include "server_limits.h"
94
94
#include "attribute.h"
95
95
#include "resource.h"
96
 
#include "job.h"
 
96
#include "pbs_job.h"
97
97
#include "mom_mach.h"
98
98
#include "mom_func.h"
99
99
 
100
 
static char ident[] = "@(#) $RCSfile$ $Revision: 2394 $";
 
100
static char ident[] = "@(#) $RCSfile$ $Revision: 3384 $";
101
101
 
102
102
/* Global Variables */
103
103
 
118
118
 *  -2 - if other, message in log_buffer
119
119
 */
120
120
 
121
 
int set_job(pjob, sjr)
122
 
job *pjob;
123
 
 
124
 
struct startjob_rtn *sjr;
 
121
int
 
122
set_job(job *pjob, struct startjob_rtn *sjr)
125
123
  {
126
124
  return (sjr->sj_session = setsid());
127
125
  }
130
128
** set_globid - set the global id for a machine type.
131
129
*/
132
130
void
133
 
set_globid(pjob, sjr)
134
 
job *pjob;
135
 
 
136
 
struct startjob_rtn *sjr;
 
131
set_globid(job *pjob, struct startjob_rtn *sjr)
137
132
  {
138
133
  extern char noglobid[];
139
134
 
146
141
 */
147
142
 
148
143
int
149
 
set_mach_vars(pjob, vtab)
150
 
job      *pjob;    /* pointer to the job */
151
 
 
152
 
struct var_table *vtab;    /* pointer to variable table */
 
144
set_mach_vars(
 
145
  job *pjob,    /* pointer to the job */
 
146
  struct var_table *vtab    /* pointer to variable table */
 
147
)
153
148
  {
154
149
  return 0;
155
150
  }
156
151
 
157
 
char *set_shell(pjob, pwdp)
158
 
job       *pjob;
159
 
 
160
 
struct passwd *pwdp;
 
152
char *
 
153
set_shell(job *pjob, struct passwd *pwdp)
161
154
  {
162
155
  char *cp;
163
156
  int   i;
209
202
  int  exiteval;
210
203
  pid_t  pid;
211
204
  job  *pjob;
212
 
  task  *ptask;
 
205
  task  *ptask = NULL;
213
206
  int  statloc;
214
207
 
215
208
  /* update the latest intelligence about the running jobs;         */
273
266
    if (pjob == NULL)
274
267
      {
275
268
      DBPRT(("%s: pid %d not tracked, exit %d\n",
276
 
             id, pid, exiteval))
 
269
             id, (int)pid, (int)exiteval))
277
270
      continue;
278
271
      }
279
272
 
292
285
      }
293
286
 
294
287
    DBPRT(("%s: task %d pid %d exit value %d\n", id,
 
288
           (int)ptask->ti_qs.ti_task, (int)pid, exiteval))
295
289
 
296
 
           ptask->ti_qs.ti_task, pid, exiteval))
297
290
    kill_task(ptask, SIGKILL, 0);
298
291
    ptask->ti_qs.ti_exitstat = exiteval;
299
292
    ptask->ti_qs.ti_status = TI_STATE_EXITED;
329
322
 
330
323
  (void)strncpy(pty_name, "/dev/ptyXY", PTY_SIZE);
331
324
 
 
325
  pc1 = ident; /* this is to remove unused ident warning in compiler */
 
326
 
332
327
  for (pc1 = ptcchar1; *pc1 != '\0'; ++pc1)
333
328
    {
334
329
    pty_name[8] = *pc1;