Skip to content
Snippets Groups Projects
Commit fe015bfc authored by tewk's avatar tewk
Browse files

Little fixes

signal restoration now occurs in socket_impl
parent f19e3432
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@
#define SLURM_PROTOCOL_VERSION_ERROR -1910
/* _info.c/ocommuncation layer RESPONSE_SLURM_RC message codes */
#define SLURM_NO_CHANGE_IN_DATA 100
#define SLURM_NO_CHANGE_IN_DATA -1920
/* job_mgr.c/job_create */
#define ESLURM_INVALID_PARTITION_SPECIFIED -2000
......
......@@ -102,8 +102,14 @@ ssize_t _slurm_msg_sendto ( slurm_fd open_fd, char *buffer , size_t size , uint3
char * size_buffer = size_buffer_temp ;
unsigned int size_buffer_len = 8 ;
struct sigaction newaction ;
struct sigaction oldaction ;
newaction . sa_handler = SIG_IGN ;
/* ignore SIGPIPE so that send can return a error code if the other side closes the socket */
signal(SIGPIPE, SIG_IGN);
//signal(SIGPIPE, SIG_IGN);
sigaction(SIGPIPE, &newaction , & oldaction );
pack32 ( size , ( void ** ) & size_buffer , & size_buffer_len ) ;
......@@ -122,7 +128,8 @@ ssize_t _slurm_msg_sendto ( slurm_fd open_fd, char *buffer , size_t size , uint3
return SLURM_PROTOCOL_ERROR ;
}
signal(SIGPIPE, SIG_DFL);
//signal(SIGPIPE, SIG_DFL);
sigaction(SIGPIPE, &oldaction , & newaction );
return send_len ;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment