Newbie developer: /bin/sh sees command with arguments as name for binary
- From: Julian Groß <julian g posteo de>
- To: gnome-devel-list gnome org
- Subject: Newbie developer: /bin/sh sees command with arguments as name for binary
- Date: Sun, 14 Mar 2021 15:11:58 +0100
Hello,
I am in the process of adding multi-threaded support to
file-roller. Unfortunately I have run into a weird problem where
the command that gets generated for `tar` works in terminal but
not inside file-roller. Somehow /bin/sh seems to interpret
whatever you give to --use-compress-program="" as a binary rather
than a binary and an argument.
This is what I currently have:
https://gitlab.gnome.org/jug007/file-roller/-/merge_requests/1/diffs
The lbzip2 code at line 217 in src/fr-command-tar.c is what I am
currently working with. Compressing something to tar.bz2 with
lbzip2 installed fails since /bin/sh cannot find the command
"lbzip2 -n 1".
The code for actually running the command seems to be in
src/fr-process.c line 944, but I cannot really make any sense of
it. I am pretty much a complete newbie and this is my first time
working on a program in C.
I would appreciate if someone could take a look at the code and
see if they can find out what is going wrong.
By the way, and example command that is generated by file-roller
is:
tar --force-local --no-recursion --no-wildcards -v -p -C
/home/motofckr9k/osc/home:JulianGro/vircadia-domain -cf
/home/motofckr9k/osc/home:JulianGro/vircadia-domain/.fr-F2ZXj4/vircadia-2021.1.0.tar.bz2
--use-compress-program='lbzip2 -n 1' -T
/home/motofckr9k/.cache/.fr-Wc4QJ1/file-list --
Error message is:
/bin/sh: 1: lbzip2 -n 1: not found
Greetings
Julian Groß
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]