![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| close open files before remove | xramm | SUN Solaris | 9 | 09-14-2007 08:23 AM |
| daemon process | suresh_rupineni | Linux | 1 | 08-21-2006 02:14 AM |
| what is a daemon process | Kanu77 | High Level Programming | 6 | 03-08-2002 10:47 AM |
| Daemon process | s_chordia | High Level Programming | 2 | 01-17-2002 02:09 PM |
| File status - open/close ?? | Pal | UNIX for Dummies Questions & Answers | 3 | 09-26-2001 03:54 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Should a UNIX daemon process close open fds?
I have a UNIX daemon process that's been started by a parent process, an application server.
The behavior of this daemon process is to inherit and use the app server's file descriptors (ports/sockets). When I shutdown the app server, the daemon continues to run, because there may be other applications that want to use it. However, the app server won't restart, because the daemon process is holding its parents' ports. There is a debate as to whether its the app server's or the daemon's responsibility to close the file descriptors (say, using fcntl(...)). Which process has the responsibility of closing the open file descriptors? Richard Steven, in his Advanced Unix programming book says that the daemon should do it, but the people who created the daemon say the Posix way is better. Any takers? Thanks in advance, Kunal |
| Sponsored Links | ||
|
|