Home Bug Reports

fds[1]=0

nsnsnsns Member ✭✭
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

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Nikolai,

    I agree, it could be misleading. We'll change this.

    Thanks,
    - Mark
Sign In or Register to comment.