Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#132 /usr/bin/loadlevel handles corrupt /.loadlevel_status badly

closed-fixed
nobody
5
2008-10-21
2007-02-14
John Hughes
No

During testing I managed to screw up /.loadlevel_status, putting /usr/bin/loadlevel in a near infinite loop on boot.

Problem is this code in do_update_status_file:

while (fscanf(fp, "%d %s\n", &num, on) != EOF) {
if (num == node) {
found = 1;
fprintf(fp2,"%u %s\n",node,buf);
continue;
}
fprintf(fp2,"%d %s\n",num,on);
}

Should be

while (fscanf(fp, "%d %s\n", &num, on) == 2) {
[...]

Discussion

  • John Hughes
    John Hughes
    2007-02-16

    Logged In: YES
    user_id=166336
    Originator: YES

    Fixed

     
  • John Hughes
    John Hughes
    2007-02-16

    • status: open --> closed
     
  • John Hughes
    John Hughes
    2008-10-21

    • status: closed --> closed-fixed