Ignore SIGPIPE, since we are using popen when printing. Otherwise, the
entire rdesktop application might exit just because lpr was quick to terminate. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1610 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
5a8b964cc0
commit
133d9cf53a
10
rdesktop.c
10
rdesktop.c
@ -27,6 +27,7 @@
|
||||
#include <sys/times.h> /* times */
|
||||
#include <ctype.h> /* toupper */
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include "rdesktop.h"
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
@ -474,6 +475,15 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Ignore SIGPIPE, since we are using popen() */
|
||||
struct sigaction act;
|
||||
memset(&act, 0, sizeof(act));
|
||||
act.sa_handler = SIG_IGN;
|
||||
sigemptyset(&act.sa_mask);
|
||||
act.sa_flags = 0;
|
||||
sigaction(SIGPIPE, &act, NULL);
|
||||
|
||||
flags = RDP_LOGON_NORMAL;
|
||||
prompt_password = False;
|
||||
domain[0] = password[0] = shell[0] = directory[0] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user