Message ID | 20220422235944.2808227-1-dominique.martinet@atmark-techno.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/6] sigchld_handler: report child exit status correctly | expand |
Hi Stephano, when do you think you could have time to have a look at these patches? I appreciate the race from the other thread (small updates being considered finished before they started) is hard to fix so answer there can be delayed, but these patches here are unrelated and worth applying regardless. I think I've justified each patch individually when not obvious but please tell me if you'd like more rationale or any adjustment done. Thanks,
On 06.05.22 02:28, Dominique Martinet wrote: > Hi Stephano, > > when do you think you could have time to have a look at these patches? > Your series is on my TODO list and I wait for a new release until I merge them. > I appreciate the race from the other thread (small updates being > considered finished before they started) is hard to fix so answer there > can be delayed, Yes, it is, I need to find the time for it. > but these patches here are unrelated and worth applying > regardless. I will check them soon. > > I think I've justified each patch individually when not obvious but > please tell me if you'd like more rationale or any adjustment done. > > Thanks, Best regards, Stefano
Stefano Babic wrote on Fri, May 06, 2022 at 07:59:35AM +0200: > Your series is on my TODO list and I wait for a new release until I merge > them. patches 4&5 form a real bug fix, swupdate process never exits with a non-trivial swu that fails immediately if the error happens when it's not done streaming seems important enough to me. For example this artificial sw-description hangs, with somefile being big enough that it is not all sent at once (e.g. 1MB works) and version "testvers" already set >= 1 in sw-versions that update fails: --- software = { version = "0.1.0"; description = "test hang"; hardware-compatibility = [ "#RE:^.*$" ]; files: ( { filename = "somefile"; path = "/tmp/dest"; name = "testvers"; version = "1"; install-if-higher = true; sha256 = "2cb528765104da5a932cb35421ff1f501dfefc9d23d797e522912f595b490457"; } ); } --- The rest can probably wait if you prefer, I wasn't aware a release is close. > > I appreciate the race from the other thread (small updates being > > considered finished before they started) is hard to fix so answer there > > can be delayed, > > Yes, it is, I need to find the time for it. Yes, that's been waiting long enough and can wait after next release at this point. > > but these patches here are unrelated and worth applying > > regardless. > > I will check them soon. Thank you,
On 23.04.22 01:59, Dominique Martinet wrote: > Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> > --- > core/pctl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/core/pctl.c b/core/pctl.c > index 2a09d9807e3a..ed5d49bbbf01 100644 > --- a/core/pctl.c > +++ b/core/pctl.c > @@ -429,7 +429,7 @@ void sigchld_handler (int __attribute__ ((__unused__)) signum) > hasdied = 0; > if (WIFEXITED(status)) { > hasdied = 1; > - printf("exited, status=%d\n", WIFEXITED(status)); > + printf("exited, status=%d\n", WEXITSTATUS(status)); > } else if (WIFSIGNALED(status)) { > hasdied = 1; > printf("killed by signal %d\n", WTERMSIG(status)); Applied to -master, thanks ! Best regards, Stefano Babic
diff --git a/core/pctl.c b/core/pctl.c index 2a09d9807e3a..ed5d49bbbf01 100644 --- a/core/pctl.c +++ b/core/pctl.c @@ -429,7 +429,7 @@ void sigchld_handler (int __attribute__ ((__unused__)) signum) hasdied = 0; if (WIFEXITED(status)) { hasdied = 1; - printf("exited, status=%d\n", WIFEXITED(status)); + printf("exited, status=%d\n", WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { hasdied = 1; printf("killed by signal %d\n", WTERMSIG(status));
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> --- core/pctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)