home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 3937 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.6 KB  |  42 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!gatech!taco!dwthoma1
  3. From: dwthoma1@eos.ncsu.edu (DAVID W THOMAS)
  4. Subject: is there an unbind() command for sockets
  5. Message-ID: <1992Jul27.180950.3497@ncsu.edu>
  6. Originator: dwthoma1@c00041-118dan.eos.ncsu.edu
  7. Lines: 29
  8. Sender: news@ncsu.edu (USENET News System)
  9. Reply-To: dwthoma1@eos.ncsu.edu (DAVID W THOMAS)
  10. Organization: North Carolina State University, Project Eos
  11. Date: Mon, 27 Jul 1992 18:09:50 GMT
  12.  
  13.  
  14.  
  15. Once a process is listening to a socket, is there anyway to
  16. shutdown the socket and allow a new process to listen to the socket?
  17. (without killing the process and all of it's children)?
  18.  
  19. In more detail:
  20.  
  21. I would like to be able to perform software upgrades to a batch server.
  22. I want to kill the server, install the new program, and execute it.
  23. However, the server might have batch jobs running, and I wish to leave
  24. them intact, but as 'child processes' of the original batch server, they
  25. cause the error message "internet domain bind: Address already in use" when
  26. I try to restart a new server.
  27.  
  28. Is there any way to prevent children processes (created with fork/execl)
  29. from inheriting open/bound sockets?
  30.  
  31. Is there any way to shutdown/unbind in the original server and children, so
  32. that the new server can bind to the same address?  (If the answer is
  33. "shutdown()" then I used it incorrectly, and an example would be appreciated).
  34.  
  35. I don't think that I want to use "setsockopt(... SO_REUSEADDR)" because then
  36. ANY other process would be able to bind to the port.  Plus, I tried
  37. this, and could not get it to work.  I need to see an example 
  38. of how to use "setsockopt" if this is the answer.
  39.  
  40. David W. Thomas
  41. dwthoma1@eos.ncsu.edu
  42.