GNU Astronomy Utilities - Bugs: bug #65681, Remove all system calls within...
You are not allowed to post comments on this tracker with your current authentication level.
bug #65681: Remove all system calls within Gnuastro
Submitter: | Mohammad Akhlaghi <makhlaghi> | ||
Submitted: | Fri 03 May 2024 07:46:11 PM UTC | ||
Category: | All Gnuastro | Severity: | 3 - Normal |
Item Group: | Crash | Status: | Confirmed |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
Sun 19 May 2024 12:01:42 AM UTC, comment #4: |
Mohammad Akhlaghi <makhlaghi> |
Fri 17 May 2024 08:06:34 PM UTC, comment #3: Thanks to Sepideh Eskandarlou, I discovered that the 'execl' solution suggested in the previous comment will close the Gnuastro program that calls it! As a result, in the case of ConvertType calling Ghostscript, it couldn't delete the temporary EPS file.
|
Mohammad Akhlaghi <makhlaghi> |
Fri 17 May 2024 10:47:40 AM UTC, comment #2: Even though the basic C program of the previous comment works, for some reason, within Gnuastro the problem remains: 'system' uses '/bin/sh'; even when PATH contains an 'sh' at another location with higher priority. We discovered this in a system with a faulty '/bin/sh' in the running environment.
|
Mohammad Akhlaghi <makhlaghi> |
Sat 04 May 2024 10:39:29 AM UTC, comment #1: To better understand the behavior of C's 'system()' function, I wrote the following basic C program:
|
Mohammad Akhlaghi <makhlaghi> |
Fri 03 May 2024 07:46:11 PM UTC, original submission:
Gnuastro query uses the 'system()' function of C to call the 'curl' command. On the other hand 'system()' uses '/bin/sh' to call the command that is given to it (even when '/bin/sh' is not in the PATH). As a result, when '/bin/sh' has a problem in the running environment, Gnuastro's Query will crash and there is no way for a user of Query to specify a different shell.
|
Mohammad Akhlaghi <makhlaghi> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2024-05-17 | makhlaghi | Category | Query | All Gnuastro | |
Summary | Query crashes because /bin/sh linking error | Remove all system calls within Gnuastro |
Powered by Savane 3.13-3e34.
Corresponding source code
In Commit bfc00b757b, the solution of the previous comment was generalized into an internal wrapper function 'gal_checkset_exec' and the PDF library now uses that. This should make complete removal of system() calls within Gnuastro easier ;-).