mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
This commit is contained in:
commit
7b1b8c3694
@ -3412,7 +3412,7 @@ format_helper_exit_status(unsigned char child_state, int saved_errno,
|
|||||||
* Count how many chars of space we have left, and keep a pointer into the
|
* Count how many chars of space we have left, and keep a pointer into the
|
||||||
* current point in the buffer.
|
* current point in the buffer.
|
||||||
*/
|
*/
|
||||||
left = HEX_ERRNO_SIZE;
|
left = HEX_ERRNO_SIZE+1;
|
||||||
cur = hex_errno;
|
cur = hex_errno;
|
||||||
|
|
||||||
/* Emit child_state */
|
/* Emit child_state */
|
||||||
@ -3712,7 +3712,7 @@ tor_spawn_background(const char *const filename, const char **argv,
|
|||||||
this is used for printing out the error message */
|
this is used for printing out the error message */
|
||||||
unsigned char child_state = CHILD_STATE_INIT;
|
unsigned char child_state = CHILD_STATE_INIT;
|
||||||
|
|
||||||
char hex_errno[HEX_ERRNO_SIZE + 1];
|
char hex_errno[HEX_ERRNO_SIZE + 2]; /* + 1 should be sufficient actually */
|
||||||
|
|
||||||
static int max_fd = -1;
|
static int max_fd = -1;
|
||||||
|
|
||||||
|
@ -2252,6 +2252,7 @@ test_util_exit_status(void *ptr)
|
|||||||
n = format_helper_exit_status(0xFF, -0x80000000, hex_errno);
|
n = format_helper_exit_status(0xFF, -0x80000000, hex_errno);
|
||||||
test_streq("FF/-80000000\n", hex_errno);
|
test_streq("FF/-80000000\n", hex_errno);
|
||||||
test_eq(n, strlen(hex_errno));
|
test_eq(n, strlen(hex_errno));
|
||||||
|
test_eq(n, HEX_ERRNO_SIZE);
|
||||||
|
|
||||||
clear_hex_errno(hex_errno);
|
clear_hex_errno(hex_errno);
|
||||||
n = format_helper_exit_status(0x7F, 0, hex_errno);
|
n = format_helper_exit_status(0x7F, 0, hex_errno);
|
||||||
|
Loading…
Reference in New Issue
Block a user