mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-29 03:16:01 +01:00
- s/sprintf/snprintf
- updated some po's - fixed crash bug when removing WINDOWS_MENU or WORKSPACE_MENU from rootmenu - some other stuff i forgot
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
|
||||
#include "../src/config.h"
|
||||
#include "wconfig.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
@@ -351,6 +352,12 @@ getSocketAddress(char* name, char* service, char* protocol) /*FOLD00*/
|
||||
return &socketaddr;
|
||||
}
|
||||
|
||||
static void
|
||||
handle_sigpipe(int signum)
|
||||
{
|
||||
if (0) signum=0; /* To avoid a gcc warning */
|
||||
return;
|
||||
}
|
||||
|
||||
static WMConnection*
|
||||
createConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
|
||||
@@ -377,7 +384,12 @@ createConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
|
||||
|
||||
/* ignore dead pipe */
|
||||
if (!SigInitialized) {
|
||||
sig_action.sa_handler = SIG_IGN;
|
||||
sig_action.sa_handler = &handle_sigpipe;
|
||||
/* Because POSIX mandates that only signal with handlers are reset
|
||||
accross an exec*(), we do not want to propagate ignoring SIGPIPEs
|
||||
to children. Hence the dummy handler.
|
||||
Philippe Troin <phil@fifi.org>
|
||||
*/
|
||||
sig_action.sa_flags = SA_RESTART;
|
||||
sigaction(SIGPIPE, &sig_action, NULL);
|
||||
SigInitialized = True;
|
||||
@@ -448,7 +460,7 @@ WMCreateConnectionAsServerAtAddress(char *host, char *service, char *protocol) /
|
||||
WCErrorCode = 0;
|
||||
|
||||
if ((socketaddr = getSocketAddress(host, service, protocol)) == NULL) {
|
||||
wwarning("Bad address-service-protocol combination");
|
||||
wwarning(_("Bad address-service-protocol combination"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -513,7 +525,7 @@ WMCreateConnectionToAddress(char *host, char *service, char *protocol) /*FOLD00*
|
||||
host = "localhost";
|
||||
|
||||
if ((socketaddr = getSocketAddress(host, service, protocol)) == NULL) {
|
||||
wwarning("Bad address-service-protocol combination");
|
||||
wwarning(_("Bad address-service-protocol combination"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -556,7 +568,7 @@ WMCreateConnectionToAddressAndNotify(char *host, char *service, char *protocol)
|
||||
host = "localhost";
|
||||
|
||||
if ((socketaddr = getSocketAddress(host, service, protocol)) == NULL) {
|
||||
wwarning("Bad address-service-protocol combination");
|
||||
wwarning(_("Bad address-service-protocol combination"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user