aboutsummaryrefslogtreecommitdiff
path: root/src/util/os_priority.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-07 00:15:19 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-07 00:15:19 +0000
commiteb48b0fb4f5e61a5a4b65378a647b7717b011020 (patch)
tree0aa9dcf04dcfee3f530d410182399d4e239aecce /src/util/os_priority.c
parent7ecdcb36506603426953cf3588a8840f4cdca8ca (diff)
downloadgnunet-eb48b0fb4f5e61a5a4b65378a647b7717b011020.tar.gz
gnunet-eb48b0fb4f5e61a5a4b65378a647b7717b011020.zip
-doxygenfixes
Diffstat (limited to 'src/util/os_priority.c')
-rw-r--r--src/util/os_priority.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index 0f2acca06..de5c84d4c 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -1330,22 +1330,20 @@ GNUNET_OS_start_process_v (int pipe_control,
1330 1330
1331/** 1331/**
1332 * Start a process. This function is similar to the GNUNET_OS_start_process_* 1332 * Start a process. This function is similar to the GNUNET_OS_start_process_*
1333 * except that the @a filename and @argv can have whole strings which contain 1333 * except that the filename and arguments can have whole strings which contain
1334 * the arguments. These arguments are to be separated by spaces and are parsed 1334 * the arguments. These arguments are to be separated by spaces and are parsed
1335 * in the order they appear. Arguments containing spaces can be used by 1335 * in the order they appear. Arguments containing spaces can be used by
1336 * quoting them with @em ". 1336 * quoting them with @em ".
1337 * 1337 *
1338 * @param pipe_control should a pipe be used to send signals to the child? 1338 * @param pipe_control should a pipe be used to send signals to the child?
1339 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags 1339 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
1340 * @param lsocks array of listen sockets to dup systemd-style (or NULL); 1340 * @param lsocks array of listen sockets to dup systemd-style (or NULL);
1341 * must be NULL on platforms where dup is not supported 1341 * must be NULL on platforms where dup is not supported
1342 * @param filename name of the binary. It is valid to have the arguments 1342 * @param first_arg name of the binary. It is valid to have the arguments
1343 * in this string when they are separated by spaces. 1343 * in this string when they are separated by spaces.
1344 * @param ... more arguments. Should be of type <tt>char *</tt>. It is valid 1344 * @param ... more arguments. Should be of type `char *`. It is valid
1345 * to have the arguments in these strings when they are separated by 1345 * to have the arguments in these strings when they are separated by
1346 * spaces. 1346 * spaces.
1347 * @param argv NULL-terminated list of arguments to the process,
1348 * including the process name as the first argument
1349 * @return pointer to process structure of the new process, NULL on error 1347 * @return pointer to process structure of the new process, NULL on error
1350 */ 1348 */
1351struct GNUNET_OS_Process * 1349struct GNUNET_OS_Process *
@@ -1384,7 +1382,7 @@ GNUNET_OS_start_process_s (int pipe_control,
1384 quote_on = 0; 1382 quote_on = 0;
1385 else 1383 else
1386 quote_on = 1; 1384 quote_on = 1;
1387 } 1385 }
1388 if ( (' ' == *rpos) && (0 == quote_on) ) 1386 if ( (' ' == *rpos) && (0 == quote_on) )
1389 { 1387 {
1390 if (NULL != last) 1388 if (NULL != last)
@@ -1416,7 +1414,7 @@ GNUNET_OS_start_process_s (int pipe_control,
1416 quote_on = 0; 1414 quote_on = 0;
1417 pos = cp; 1415 pos = cp;
1418 while ('\0' != *pos) 1416 while ('\0' != *pos)
1419 { 1417 {
1420 if ('"' == *pos) 1418 if ('"' == *pos)
1421 { 1419 {
1422 if (1 == quote_on) 1420 if (1 == quote_on)
@@ -1447,14 +1445,14 @@ GNUNET_OS_start_process_s (int pipe_control,
1447 while (NULL != (arg = (va_arg (ap, const char*)))); 1445 while (NULL != (arg = (va_arg (ap, const char*))));
1448 va_end (ap); 1446 va_end (ap);
1449 argv[argv_size] = NULL; 1447 argv[argv_size] = NULL;
1450 1448
1451 for(i = 0; i < argv_size; i++) 1449 for(i = 0; i < argv_size; i++)
1452 { 1450 {
1453 len = strlen (argv[i]); 1451 len = strlen (argv[i]);
1454 if ( (argv[i][0] == '"') && (argv[i][len-1] == '"')) 1452 if ( (argv[i][0] == '"') && (argv[i][len-1] == '"'))
1455 { 1453 {
1456 memmove (&argv[i][0], &argv[i][1], len - 2); 1454 memmove (&argv[i][0], &argv[i][1], len - 2);
1457 argv[i][len-2] = '\0'; 1455 argv[i][len-2] = '\0';
1458 } 1456 }
1459 } 1457 }
1460 binary_path = argv[0]; 1458 binary_path = argv[0];