Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a467a28a
Commit
a467a28a
authored
Nov 30, 2005
by
Timothy Stack
Browse files
Ensure that the experiment logs directory exists.
parent
863602d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
event/sched/event-sched.c
View file @
a467a28a
...
...
@@ -22,6 +22,7 @@
#include
<signal.h>
#include
<sys/time.h>
#include
<sys/types.h>
#include
<sys/stat.h>
#include
<sys/wait.h>
#include
<sys/param.h>
#include
<time.h>
...
...
@@ -865,8 +866,16 @@ dequeue(event_handle_t handle)
int
SetExpPath
(
const
char
*
path
)
{
struct
stat
st
;
int
retval
;
setenv
(
"EXPDIR"
,
path
,
1
);
return
chdir
(
path
);
retval
=
chdir
(
path
);
if
(
stat
(
"logs"
,
&
st
)
==
-
1
)
mkdir
(
"logs"
,
0770
);
return
retval
;
}
int
...
...
tbsetup/eventsys.proxy.in
View file @
a467a28a
...
...
@@ -162,6 +162,14 @@ my (undef,undef,$unix_pgid) = getgrnam($pid) or
die
("
*** $0:
\n
"
.
"
No such group
$pid
\n
");
my
$LOGDIR
=
`
dirname
$logfile
`;
if
(
!
-
d
$LOGDIR
)
{
if
(
system
("
mkdir -p -m 775
$LOGDIR
"))
{
die
("
*** $0:
\n
"
.
"
Could not mkdir
$LOGDIR
\n
");
}
}
#
# Create a chile whose output is directed into the logfile. Parents waits
# a moment and then exits.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment