I just spawned a task and I want to redirect it’s STDIN to ttyp3. I have to
do this form outside the task(right next to the spawn function call).
Can somebody please tell me how to do this?
Thank You
LP
I just spawned a task and I want to redirect it’s STDIN to ttyp3. I have to
do this form outside the task(right next to the spawn function call).
Can somebody please tell me how to do this?
Thank You
LP
Search for qnx_spawn_options in the doc.
“Lorenz Prem” <Lorenz.Prem@guidant.com> wrote in message
news:9ejabk$ncf$1@inn.qnx.com…
I just spawned a task and I want to redirect it’s STDIN to ttyp3. I have
to
do this form outside the task(right next to the spawn function call).Can somebody please tell me how to do this?
Thank You
LP
more specifically, you want to get an fd to the tty
(open it for RDWR)
and then set the iov members of the qnx_spawn_options structure to point
to this fd. set iov[0] to iov[2] to the fd
then set your flags to set yourself as a session leader:
qnx_spawn_options.flags |= _SPAWN_SETSID | _SPAWN_TCSETPGRP
then call spawn[vpe]
Mario Charest <mcharest@antispam_zinformatic.com> wrote:
Search for qnx_spawn_options in the doc.
“Lorenz Prem” <> Lorenz.Prem@guidant.com> > wrote in message
news:9ejabk$ncf$> 1@inn.qnx.com> …
I just spawned a task and I want to redirect it’s STDIN to ttyp3. I have
to
do this form outside the task(right next to the spawn function call).Can somebody please tell me how to do this?
Thank You
LP
–
Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579