Thread: fds[1]=0
View Single Post
  #1 (permalink)  
Old 10-25-2004
nsns nsns is offline
Registered User
 
 
Join Date: Jul 2004
Location: Padova, Italy
Posts: 36
fds[1]=0

Hi,

this is not a bug report but a suggestion to make a small change in

Ice::Service::runDaemon()

The function contains the following lines:

close(fds[1]);
fds[1] = 0;

The second line is to mark the file descriptor as closed and later this value is tested.
Although it works, it is misleading because 0 is usually associated with stdin. Maybe better to use -1:
fds[1] = -1;

Cheers, Nikolai
Reply With Quote