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

« back to all changes in this revision

Viewing changes to src/scheduler.cc/pbs_sched.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:
1132
1132
 
1133
1133
    lock_out(lockfds, F_WRLCK);
1134
1134
 
1135
 
    if (!freopen(dbfile, "a", stdout)) {
1136
 
      perror("lockout, attempting to freopen dbfile");
 
1135
    if (freopen(dbfile, "a", stdout) == NULL)
 
1136
      {
 
1137
      perror("opening lockfile");
 
1138
 
1137
1139
      exit(1);
1138
 
    }
 
1140
      }
 
1141
 
1139
1142
 
1140
1143
    setvbuf(stdout, NULL, _IOLBF, 0);
1141
1144
 
1149
1152
    pid = getpid();
1150
1153
    }
1151
1154
 
1152
 
  if (!freopen("/dev/null", "r", stdin)) {
1153
 
    perror("lockout, attempting to freopen /dev/null");
 
1155
  if (freopen("/dev/null", "r", stdin) == NULL)
 
1156
    {
 
1157
    perror("opening /dev/null");
 
1158
 
1154
1159
    exit(1);
1155
 
  }
 
1160
    }
1156
1161
 
1157
1162
  /* write scheduler's pid into lockfile */
1158
1163