Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
8a0a2dbb
Commit
8a0a2dbb
authored
19 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Remove logic to disable localtime_r() after a fork(), it is no longer
needed thanks to slurmd_step functionality.
parent
a5b4e5b0
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common/macros.h
+0
-11
0 additions, 11 deletions
src/common/macros.h
src/common/slurm_cred.c
+1
-1
1 addition, 1 deletion
src/common/slurm_cred.c
src/slurmd/req.c
+0
-4
0 additions, 4 deletions
src/slurmd/req.c
with
1 addition
and
16 deletions
src/common/macros.h
+
0
−
11
View file @
8a0a2dbb
...
@@ -236,15 +236,4 @@ typedef enum {false, true} bool;
...
@@ -236,15 +236,4 @@ typedef enum {false, true} bool;
# endif
# endif
#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 */
#endif
/* !_MACROS_H */
This diff is collapsed.
Click to expand it.
src/common/slurm_cred.c
+
1
−
1
View file @
8a0a2dbb
...
@@ -1118,7 +1118,7 @@ static char * timestr (const time_t *tp, char *buf, size_t n)
...
@@ -1118,7 +1118,7 @@ static char * timestr (const time_t *tp, char *buf, size_t n)
if
(
disabled
)
return
NULL
;
if
(
disabled
)
return
NULL
;
#endif
#endif
if
(
!
localtime_r
(
tp
,
&
tmval
))
if
(
!
localtime_r
(
tp
,
&
tmval
))
error
(
"localtime: %m"
);
error
(
"localtime
_r
: %m"
);
strftime
(
buf
,
n
,
fmt
,
&
tmval
);
strftime
(
buf
,
n
,
fmt
,
&
tmval
);
return
(
buf
);
return
(
buf
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/slurmd/req.c
+
0
−
4
View file @
8a0a2dbb
...
@@ -357,10 +357,6 @@ _fork_new_slurmd(slurmd_step_type_t type, void *req,
...
@@ -357,10 +357,6 @@ _fork_new_slurmd(slurmd_step_type_t type, void *req,
return
((
int
)
pid
);
return
((
int
)
pid
);
}
}
#ifdef DISABLE_LOCALTIME
disable_localtime
();
#endif
if
(
setsid
()
<
0
)
if
(
setsid
()
<
0
)
error
(
"fork_slurmd: setsid: %m"
);
error
(
"fork_slurmd: setsid: %m"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment