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
ab017a1f
Commit
ab017a1f
authored
Apr 20, 2006
by
Mike Hibler
Browse files
Fix bug in parsing of quoted ('' or {}) command lines.
parent
86239818
Changes
1
Hide whitespace changes
Inline
Side-by-side
event/program-agent/program-agent.c
View file @
ab017a1f
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2000-200
5
University of Utah and the Flux Group.
* Copyright (c) 2000-200
6
University of Utah and the Flux Group.
* All rights reserved.
*/
...
...
@@ -1079,14 +1079,18 @@ set_program(struct proginfo *pinfo, char *args)
char
*
value
;
int
rc
;
if
((
rc
=
event_arg_
get
(
args
,
"COMMAND"
,
&
value
))
>
0
)
{
if
((
rc
=
event_arg_
dup
(
args
,
"COMMAND"
,
&
value
))
>
=
0
)
{
if
(
pinfo
->
cmdline
!=
NULL
)
{
if
(
pinfo
->
cmdline
!=
pinfo
->
initial_cmdline
)
{
if
(
pinfo
->
cmdline
!=
pinfo
->
initial_cmdline
)
free
(
pinfo
->
cmdline
);
pinfo
->
cmdline
=
NULL
;
}
}
asprintf
(
&
pinfo
->
cmdline
,
"%s"
,
value
);
if
(
rc
==
0
)
{
pinfo
->
cmdline
=
pinfo
->
initial_cmdline
;
}
else
if
(
rc
>
0
)
{
pinfo
->
cmdline
=
value
;
}
else
{
assert
(
0
);
}
value
=
NULL
;
}
if
((
rc
=
event_arg_dup
(
args
,
"DIR"
,
&
value
))
>=
0
)
{
...
...
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