Reputation: 1931
I have this problem: I have a script A, and it calls another script B, but this script B must run in another session, it is an easy job to do in a C program with setsid (), but I cannot find an equivalent shell command. There is a setsid shell command in Linux, but there are no such commands in AIX and other UNIX platforms. Can anyone give me some advice on how to do it in AIX and other UNIX platforms? Thank you.
Upvotes: 1
Views: 2622
Reputation: 46876
The setsid() system call exists in FreeBSD and OpenSolaris, and is part of POSIX.1. So I would think that it should exist in anything that claims to be POSIX-compliant.
AIX is fully compliant with "one or more" of the POSIX standards, but I've never used it, so I can't comment on it directly. Since it's a vendor-supported operating system, I recommend you touch base with your vendor.
Now.. What do you mean by "an equivalent shell command"? What do you mean by "session" in the context of a shell script? If what you're looking for is a way to run a second shell script with a separate controlling terminal from the original script, I suggest you look at GNU Screen instead of system calls. Screen should be available for AIX.
If you have a shell script that currently works for you in Linux, and you're trying to port it to other platforms, then include the script in your question. Otherwise, we're flying blind.
Upvotes: 1