Opened 9 years ago

Closed 6 years ago

#1224 closed enhancement (fixed)

Replace signal with sigaction

Reported by: Alex Toader Owned by: dkamov
Priority: minor Milestone: 9.7
Component: undecided Version: development
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Easy

Description

The manual states:

 The only portable use of signal() is to set a signal's disposition to SIG_DFL or  SIG_IGN.   The  semantics when  using signal() to establish a signal handler vary across systems (and POSIX.1 explicitly permits this variation); do not use it for this purpose.
 POSIX.1 solved the portability mess by specifying sigaction(2), which  provides  explicit  control  of  the semantics when a signal handler is invoked; use that interface instead of signal().

Whenever you see a call to signal in the code, replace it with sigaction.

Change History (2)

comment:1 by Dimitar Misev, 6 years ago

Cc: Alex Dumitru George Merticariu removed
Milestone: 9.7
Owner: set to dkamov
Status: newassigned

Should be fixed in these files (search for 'signal('):

applications/rasql/rasql_signal.cc
applications/directql/directql_signal.cc
clientcomm/rpcclientcomm.cc
rasmgr_x/src/main.cc
servercomm/manager.cc
servercomm/servercomm.cc
servercomm/httpserver.cc
server/rasserver_main.cc
rnprotocol/rnpserver.cc

comment:2 by Dimitar Misev, 6 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.