| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(Thanks Eric Blake).
|
|
|
|
|
|
|
| |
Don't depend on bash, but allow sh/dash/etc format:
GUESTFISH_PID=nn; export GUESTFISH_PID
(Thanks Eric Blake).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert all uses automatically, via these two commands:
git grep -l '\<exit *(1)' \
| grep -vEf .x-sc_prohibit_magic_number_exit \
| xargs --no-run-if-empty \
perl -pi -e 's/\b(exit ?)\(1\)/$1(EXIT_FAILURE)/'
git grep -l '\<exit *(0)' \
| grep -vEf .x-sc_prohibit_magic_number_exit \
| xargs --no-run-if-empty \
perl -pi -e 's/\b(exit ?)\(0\)/$1(EXIT_SUCCESS)/'
* .x-sc_prohibit_magic_number_exit: New file.
Edit (RWMJ): Don't change Java code.
|
|
|
|
|
| |
git grep -l 'strcmp *([^=]*!= *0'|xargs \
perl -pi -e 's/\bstrcmp( *\(.*?\)) *!= *0\b/STRNEQ$1/g'
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
guestfish --listen necessarily redirects its stdout to /dev/null so as not to
interfere with eval. The remote protocol doesn't contain any other provision for
collecting stdout for the caller, so executing guestfish --remote will never
generate any output.
This patch fixes that by forwarding the caller's STDOUT to the listener over the
unix socket connection. The listener redirects its STDOUT to the caller's STDOUT
for the duration of the command, then closes it again.
|
|
|
|
|
| |
* fish/rc.c (UNIX_PATH_MAX): Remove unused definition.
* fish/fish.h (rc_listen): Declare with __attribute__((noreturn)).
|
|
|
|
|
|
|
| |
* fish/rc.c (rc_remote): Close file handle only *after* xdr_destroy,
because that latter may flush its file handle (implicated via
xdrstdio_create). FYI, this failure is triggered for me only when
MALLOC_PERTURB_ is set to nonzero < 256 in my environment.
|
|
|
|
|
|
|
|
|
|
|
| |
Do it by running this command:
[exempted files are matched via .x-sc_TAB_in_indentation]
git ls-files \
| pcregrep -vf .x-sc_TAB_in_indentation \
| xargs pcregrep -l '^ *\t' \
| xargs perl -MText::Tabs -ni -le \
'$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
|
|
The use case is to have a long-running guestfish process in
a shell script, and thus to avoid the overhead of starting
guestfish each time. Do:
eval `guestfish --listen`
guestfish --remote somecmd
guestfish --remote someothercmd
guestfish --remote exit
This patch also supports having multiple guestfish processes
at the same time.
The protocol is simple XDR messages over a Unix domain socket.
|