This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Tiny but useful code snippet:
- To: cygwin at cygwin dot com
- Subject: Tiny but useful code snippet:
- From: linguist-cygwin at rich-paul dot net
- Date: Sat, 26 May 2001 23:40:59 -0400
--- Hide.cpp ---
#include <process.h>
#include <stdio.h>
int main ( int argc, char **argv) {
if ( argc < 2 ) {
printf("usage: %s [program] [arg1] [arg2]\n", argv[0]);
return -1;
};
if ( _spawnvp(_P_DETACH,argv[1], argv+1) ) {
perror("_spawnvp");
exit(1);
};
return 0;
};
--- Hide.cpp ---
--- sshagent ---
ssh-agent > ~/.ssh-agent
--- sshagent ---
--- .bashrc: ---
if tty -s ; then
. ~/.ssh-agent
fi
--- .bashrc ---
to compile: CXX_FLAGS=-mno-cygwin make Hide
to run ssh-agent out of sight and out of mind:
bash$ ./Hide bash sshagent
bash$ exec bash
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple