bugSystem V style init programs - Bugs: bug #35904, fclose call missing in function...

 
 

bug #35904: fclose call missing in function init.c:receive_state

Submitted by:  None
Submitted on:  Mon 19 Mar 2012 11:36:02 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Works For Me
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 20 Mar 2012 02:38:18 PM UTC, comment #1:

Hmmm ... if you close the file descriptor without re-executing
you may loose your STATE_PIPE. The check_pipe() routine is used
for polling on STATE_PIPE during re-execute.

IMHO there is no need to close the file descriptor otherwise
you may not able to re-execute if some crappy data was read
from the pipe STATE_PIPE.

And before the re-execute the file descriptor STATE_PIPE
will be (re)open in make_pipe() with dup2() and closed after
success.

You may check this by using `init u' and check the open
file descriptors whih should not be STATE_PIPE (aka 11)
but PIPE_FD (aka 10).

Dr. Werner Fink <wfink>
Project Administrator
Mon 19 Mar 2012 11:36:02 PM UTC, original submission:

I think that it is necessary to close the file before returning from function receive_state:

> if (get_cmd(f) != C_VER)
> ?????
> return -1;

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 20 Mar 2012 02:38:18 PM UTCwfinkStatusNone=>Works For Me
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1