On Sun, 16 Jul 2006, Gustavo Rios wrote:
Ok, here you have it:
I'm sorry, but I'm not gonna go though this bit flag mess.
Until you come up with a simple (let's say less than 10 lines) piece
of code to demonstrate the porblem you're seeing, my conclusion is the
bug is hiding in your code.
Hey folks,
i am trying to set a process as the session leader of its own. I wrote
a simple program that handles that. It is working when i call it from
my shell command line:
$ sux -s -e -E \
On Sun, 16 Jul 2006, Gustavo Rios wrote:
Hey folks,
i am trying to set a process as the session leader of its own. I wrote
a simple program that handles that. It is working when i call it from
my shell command line:
$ sux -s -e -E \
On 7/15/06, Gustavo Rios [EMAIL PROTECTED] wrote:
i am trying to set a process as the session leader of its own. I wrote
a simple program that handles that. It is working when i call it from
my shell command line:
...
But when i write a simple shell script like in :
The process is not
Ok, here you have it:
Code for apx_setuid :
#include unistd.h
long
apx_setsid(void)
{
return setsid();
}
Code for apx_setpgid :
#include unistd.h
int
apx_setpgid(const long p, const long g)
{
return setpgid((pid_t)p, (pid_t)g);
}
Code for sux (main.c) : (the relevant part is
On 7/16/06, Gustavo Rios [EMAIL PROTECTED] wrote:
...
static int
do_sid(const xlong f)
{
int r;
if (r = 0, f 1)
if (f 2) { if (apx_setsid() == -1) r = -1; }
else r = apx_setpgid(0l, apx_getpid());
return r;
}
Wow, what an annoying
6 matches
Mail list logo