-
-
Notifications
You must be signed in to change notification settings - Fork 579
Die on mksquashfs failure. #1189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Die on mksquashfs failure. #1189
Conversation
TheAssassin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good overall. See my comment, applies to all perror calls.
src/appimagetool.c
Outdated
|
|
||
| if (pid == -1) { | ||
| // error, failed to fork() | ||
| perror("fork()"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some context information. We use other subprocesses, too, within the scope of AppImageKit. Ideally, the message informs the user that this was trying to open the mksquashfs process.
|
ping on this one as well @TheAssassin :) |
|
Will have a look. Haven't had time for AppImage related projects in a while, and when things broke I had to invest like a full week or maybe even two... |
src/appimagetool.c
Outdated
|
|
||
| int retcode = WEXITSTATUS(status); | ||
| if (retcode) { | ||
| fprintf(stderr, "mksquashfs (pid %ld) exited with code %d\n", (long)pid, retcode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pid_t should be an int in glibc, so I'm not sure this cast is necessary, %d should work. (After all, long int and int are most likely the same size (4 bytes) on every viable platform anyway...)
|
Friendly ping on this one, @TheAssassin :) |
e20c676 to
f7f00bc
Compare
|
Thanks! |
This PR adds code to check the return code of the mksquashfs process. appimagekit will now die if mksquashfs failed.