home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / ultrix / 9226 < prev    next >
Encoding:
Text File  |  1993-01-10  |  1.2 KB  |  41 lines

  1. Newsgroups: comp.unix.ultrix
  2. Path: sparky!uunet!portal!quadsys!roland
  3. From: roland@quadsys.com (Roland Besserer)
  4. Subject: signal catching bug?
  5. Message-ID: <C0MJGq.G23@quadsys.com>
  6. Organization: QUAD Systems
  7. X-Newsreader: Tin 1.1 PL3
  8. Date: Sun, 10 Jan 1993 06:02:49 GMT
  9. Lines: 30
  10.  
  11. I am writing device drivers for ULTRIX 4.2A and have encountered a 
  12. problem that is either an ULTRIX bug or possible my misunderstanding
  13. the behaviour of a system call.
  14.  
  15. My driver will occasionally notify an attached user process by sending 
  16. a signal (psignal - SIGURG or SIGSTOP) to the application. The application
  17. is setup to allow and catch those signals (signal()). In the current
  18. test version of the application code, the sending the signal will
  19. cause a simply function to be called which prints a message to the 
  20. screen, then returns.
  21.  
  22. Here is the problem.
  23.  
  24. When a signal occurs and the installed function is called during the
  25. execution of:
  26.  
  27.     if ((err = ioctl(driver, IOCALL, param)) < 0) {
  28.         ....
  29.     }
  30.  
  31. the driverioctl() function is sometimes called TWICE with IOCALL. 
  32. Naturally, this will cause severe problems. 
  33.  
  34. Can anyone explain why this might be happening?
  35.  
  36. -- 
  37.  
  38. Roland Besserer
  39. QUAD Systems
  40. roland@quadsys.com    
  41.