diff --git a/src/common/macros.h b/src/common/macros.h index ada19676f5715b6d886b1dbd3afaf173787759d7..35c4d2d3821dc872b6aa8451efaa54b4ad831528 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -236,15 +236,4 @@ typedef enum {false, true} bool; # endif #endif -/* localtime() can't be used after a fork due to possibly set semaphore. - * until we modify slurmd and srun to exec immediately after the fork, - * we disable localtime(). This is a temporary patch. */ -#define DISABLE_LOCALTIME 1 -#include "src/common/xstring.h" -#include "src/common/slurm_cred.h" -#define disable_localtime() \ - _STMT_START { \ - _xstrftimecat(NULL, NULL); \ - timestr(NULL,NULL,0); \ - } _STMT_END #endif /* !_MACROS_H */ diff --git a/src/common/slurm_cred.c b/src/common/slurm_cred.c index b84bfca532c4d7ca59c5b2f9e13244cf2a3f0151..965301bb615d528b604d31edd6c4abf007f5e89c 100644 --- a/src/common/slurm_cred.c +++ b/src/common/slurm_cred.c @@ -1118,7 +1118,7 @@ static char * timestr (const time_t *tp, char *buf, size_t n) if (disabled) return NULL; #endif if (!localtime_r (tp, &tmval)) - error ("localtime: %m"); + error ("localtime_r: %m"); strftime (buf, n, fmt, &tmval); return (buf); } diff --git a/src/slurmd/req.c b/src/slurmd/req.c index 89a8fdfc4b4b93b6016ad481bcc06987bc235c40..cee5f1ce89d3574e60c355926e4dedd9fe4660a0 100644 --- a/src/slurmd/req.c +++ b/src/slurmd/req.c @@ -357,10 +357,6 @@ _fork_new_slurmd(slurmd_step_type_t type, void *req, return ((int) pid); } -#ifdef DISABLE_LOCALTIME - disable_localtime(); -#endif - if (setsid() < 0) error("fork_slurmd: setsid: %m");