summaryrefslogtreecommitdiffstats
path: root/fish/rc.c
Commit message (Collapse)AuthorAgeFilesLines
* fish: Add --listen --csh to for csh, tcsh compatibility.Richard W.M. Jones2010-11-051-1/+6
| | | | (Thanks Eric Blake).
* fish: More portable export sh statment.Richard W.M. Jones2010-11-051-1/+1
| | | | | | | Don't depend on bash, but allow sh/dash/etc format: GUESTFISH_PID=nn; export GUESTFISH_PID (Thanks Eric Blake).
* fish: Change 'int argc' to 'size_t argc' throughout.Richard W.M. Jones2010-10-211-3/+4
|
* maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exitJim Meyering2009-11-201-11/+11
| | | | | | | | | | | | | | | 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.
* use STREQ, not strcmp: part 2Jim Meyering2009-11-091-1/+1
| | | | | git grep -l 'strcmp *([^=]*!= *0'|xargs \ perl -pi -e 's/\bstrcmp( *\(.*?\)) *!= *0\b/STRNEQ$1/g'
* Fix type punning warning about use of CMSG_DATA in Rawhide.Richard Jones2009-09-141-2/+4
|
* guestfish: Redirect stdout when executing remote commandsMatthew Booth2009-09-141-8/+126
| | | | | | | | | | | 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.c: avoid warningsJim Meyering2009-08-211-2/+0
| | | | | * fish/rc.c (UNIX_PATH_MAX): Remove unused definition. * fish/fish.h (rc_listen): Declare with __attribute__((noreturn)).
* fish: don't read freed memoryJim Meyering2009-08-121-4/+4
| | | | | | | * 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.
* Convert all TABs-as-indentation to spaces.Jim Meyering2009-08-031-40/+40
| | | | | | | | | | | 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 : $_'
* Guestfish feature: remote control of guestfish over a pipe.Richard Jones2009-07-141-0/+272
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.