unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990]
@ 2020-05-09 20:02 Girish Joshi via Libc-alpha
  2020-05-11 12:14 ` Florian Weimer via Libc-alpha
  0 siblings, 1 reply; 6+ messages in thread
From: Girish Joshi via Libc-alpha @ 2020-05-09 20:02 UTC (permalink / raw)
  To: libc-alpha

From 9c3e8d18343e29aa1f65d1403d4c3878dd2b9865 Mon Sep 17 00:00:00 2001
From: Girish Joshi <girish946@gmail.com>
Date: Sun, 10 May 2020 01:22:04 +0530
Subject: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ
#23990]

---
support/test-container.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/test-container.c b/support/test-container.c
index afc23db148..1423320b8a 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -392,7 +392,7 @@ recursive_remove (char *path)
/* "rm" would have already printed a suitable error message. */
if (! WIFEXITED (status)
|| WEXITSTATUS (status) != 0)
- exit (1);
+ FAIL_EXIT1 ("failed to exec child");
break;
}
-- 
2.21.3



Girish Joshi

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990]
  2020-05-09 20:02 [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990] Girish Joshi via Libc-alpha
@ 2020-05-11 12:14 ` Florian Weimer via Libc-alpha
  2020-05-23 10:02   ` Girish Joshi via Libc-alpha
  2020-05-23 10:05   ` Girish Joshi via Libc-alpha
  0 siblings, 2 replies; 6+ messages in thread
From: Florian Weimer via Libc-alpha @ 2020-05-11 12:14 UTC (permalink / raw)
  To: Girish Joshi via Libc-alpha

* Girish Joshi via Libc-alpha:

> diff --git a/support/test-container.c b/support/test-container.c
> index afc23db148..1423320b8a 100644
> --- a/support/test-container.c
> +++ b/support/test-container.c
> @@ -392,7 +392,7 @@ recursive_remove (char *path)
> /* "rm" would have already printed a suitable error message. */
> if (! WIFEXITED (status)
> || WEXITSTATUS (status) != 0)
> - exit (1);
> + FAIL_EXIT1 ("failed to exec child");
> break;
> }

Sorry, this patch arrived corrupted on the list.

The error message is not correct because the child process returned an
error status.  This can mean that execvp failed, or something else.  It
would also make sense to add the status value to the error message.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990]
  2020-05-11 12:14 ` Florian Weimer via Libc-alpha
@ 2020-05-23 10:02   ` Girish Joshi via Libc-alpha
  2020-05-23 10:05   ` Girish Joshi via Libc-alpha
  1 sibling, 0 replies; 6+ messages in thread
From: Girish Joshi via Libc-alpha @ 2020-05-23 10:02 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Girish Joshi via Libc-alpha

Thanks Florian for the review.

> Sorry, this patch arrived corrupted on the list.
>
> The error message is not correct because the child process returned an
> error status.  This can mean that execvp failed, or something else.  It
> would also make sense to add the status value to the error message.
>

Reposting the patch with corrected error message.
Please let me know if it works.

From f1cc58ee37ded9a6bb3f5764143c6ea8c3572741 Mon Sep 17 00:00:00 2001
From: Girish Joshi <girish946@gmail.com>
Date: Sun, 10 May 2020 01:22:04 +0530
Subject: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child BZ #23990

---
 support/test-container.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/test-container.c b/support/test-container.c
index afc23db148..e9109f9e3d 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -392,7 +392,7 @@ recursive_remove (char *path)
     /* "rm" would have already printed a suitable error message.  */
     if (! WIFEXITED (status)
     || WEXITSTATUS (status) != 0)
-      exit (1);
+      FAIL_EXIT1 ("exec child returned status: %d", status);

     break;
   }
-- 
2.21.3

Thanks.

Girish Joshi

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990]
  2020-05-11 12:14 ` Florian Weimer via Libc-alpha
  2020-05-23 10:02   ` Girish Joshi via Libc-alpha
@ 2020-05-23 10:05   ` Girish Joshi via Libc-alpha
  2020-05-29 13:16     ` Adhemerval Zanella via Libc-alpha
  1 sibling, 1 reply; 6+ messages in thread
From: Girish Joshi via Libc-alpha @ 2020-05-23 10:05 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Girish Joshi via Libc-alpha

Thanks Florian for the review.

> Sorry, this patch arrived corrupted on the list.
>
> The error message is not correct because the child process returned an
> error status.  This can mean that execvp failed, or something else.  It
> would also make sense to add the status value to the error message.
>
> Thanks,
> Florian
>

Reposting the patch with corrected error message.
Please let me know if it works.

From f1cc58ee37ded9a6bb3f5764143c6ea8c3572741 Mon Sep 17 00:00:00 2001
From: Girish Joshi <girish946@gmail.com>
Date: Sun, 10 May 2020 01:22:04 +0530
Subject: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child BZ #23990

---
 support/test-container.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/test-container.c b/support/test-container.c
index afc23db148..e9109f9e3d 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -392,7 +392,7 @@ recursive_remove (char *path)
     /* "rm" would have already printed a suitable error message.  */
     if (! WIFEXITED (status)
     || WEXITSTATUS (status) != 0)
-      exit (1);
+      FAIL_EXIT1 ("exec child returned status: %d", status);

     break;
   }
--
2.21.3

Thanks.

Girish Joshi

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990]
  2020-05-23 10:05   ` Girish Joshi via Libc-alpha
@ 2020-05-29 13:16     ` Adhemerval Zanella via Libc-alpha
  2020-05-30 16:29       ` Girish Joshi via Libc-alpha
  0 siblings, 1 reply; 6+ messages in thread
From: Adhemerval Zanella via Libc-alpha @ 2020-05-29 13:16 UTC (permalink / raw)
  To: libc-alpha



On 23/05/2020 07:05, Girish Joshi via Libc-alpha wrote:
> Thanks Florian for the review.
> 
>> Sorry, this patch arrived corrupted on the list.
>>
>> The error message is not correct because the child process returned an
>> error status.  This can mean that execvp failed, or something else.  It
>> would also make sense to add the status value to the error message.
>>
>> Thanks,
>> Florian
>>
> 
> Reposting the patch with corrected error message.
> Please let me know if it works.
> 
> From f1cc58ee37ded9a6bb3f5764143c6ea8c3572741 Mon Sep 17 00:00:00 2001
> From: Girish Joshi <girish946@gmail.com>
> Date: Sun, 10 May 2020 01:22:04 +0530
> Subject: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child BZ #23990

LGTM, thanks.

I will push it upstream for you.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> 
> ---
>  support/test-container.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/test-container.c b/support/test-container.c
> index afc23db148..e9109f9e3d 100644
> --- a/support/test-container.c
> +++ b/support/test-container.c
> @@ -392,7 +392,7 @@ recursive_remove (char *path)
>      /* "rm" would have already printed a suitable error message.  */
>      if (! WIFEXITED (status)
>      || WEXITSTATUS (status) != 0)
> -      exit (1);
> +      FAIL_EXIT1 ("exec child returned status: %d", status);
> 
>      break;
>    }
> --
> 2.21.3
> 
> Thanks.
> 
> Girish Joshi
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990]
  2020-05-29 13:16     ` Adhemerval Zanella via Libc-alpha
@ 2020-05-30 16:29       ` Girish Joshi via Libc-alpha
  0 siblings, 0 replies; 6+ messages in thread
From: Girish Joshi via Libc-alpha @ 2020-05-30 16:29 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: Girish Joshi via Libc-alpha

> LGTM, thanks.
>
> I will push it upstream for you.
>
> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Thanks Adhemerval.

Girish Joshi

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-30 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 20:02 [PATCH] build: Used FAIL_EXIT1 () on failure to exec child [BZ #23990] Girish Joshi via Libc-alpha
2020-05-11 12:14 ` Florian Weimer via Libc-alpha
2020-05-23 10:02   ` Girish Joshi via Libc-alpha
2020-05-23 10:05   ` Girish Joshi via Libc-alpha
2020-05-29 13:16     ` Adhemerval Zanella via Libc-alpha
2020-05-30 16:29       ` Girish Joshi via Libc-alpha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).