QNX4.2x Scripting and C++ system() calls

Could somebody point me in the right direction where to find information
on the scripting “language” supported by QNX4.2x. Things like “if test
-b … fi”, etc. that are found in files like the ph script.

Also, I am making a call like “system(dinit -h /dev/hd0t78)” in C++ but
it doesn’t work correctly. I’m thinking the system call is returning
before the true 4GB partition is “dinit’ed”. I am looking for some kind
of confirmation or wait command that the dinit is done. I don’t want to
use “delay(guess a time here)” for obvious reasons.


Matt Crowell
Electrical Engineer

Vamco International, Inc.
555 Epsilon Drive
Pittsburgh, PA. 15238

Phone:412.963.7100
Fax:412.963.9511

Hello.

I believe all of the scripting stuff is just using ksh shell
programming,
so if you took a look in the helpviewer under ksh, that would probably
work. Others
can correct me if I am wrong on this.

If you need to wait for the command to finish, you might want to
investigate the spawn
commands. If memory serves me correctly, the first argument to spawn
can be set to wait
until the command executed has completed ( ie. P_WAIT ).

Hope that helps.

Rodney Lott

Matt Crowell wrote:

Could somebody point me in the right direction where to find information
on the scripting “language” supported by QNX4.2x. Things like “if test
-b … fi”, etc. that are found in files like the ph script.

Also, I am making a call like “system(dinit -h /dev/hd0t78)” in C++ but
it doesn’t work correctly. I’m thinking the system call is returning
before the true 4GB partition is “dinit’ed”. I am looking for some kind
of confirmation or wait command that the dinit is done. I don’t want to
use “delay(guess a time here)” for obvious reasons.


Matt Crowell
Electrical Engineer

Vamco International, Inc.
555 Epsilon Drive
Pittsburgh, PA. 15238

Phone:412.963.7100
Fax:412.963.9511

Rodney Lott <rod@fuelcelltechnologies.ca> wrote:

Hello.

I believe all of the scripting stuff is just using ksh shell
programming,
so if you took a look in the helpviewer under ksh, that would probably
work. Others
can correct me if I am wrong on this.

ksh will have minimal content, and a link to sh, where the actual
description is. It is, basically, a public domain Korn shell.

If you need to wait for the command to finish, you might want to
investigate the spawn
commands. If memory serves me correctly, the first argument to spawn
can be set to wait
until the command executed has completed ( ie. P_WAIT ).

system() should also wait for the command to finish.

-David

QNX Training Services
dagibbs@qnx.com

In article <3A40D61C.9969E061@fuelcelltechnologies.ca>, Rodney says…

Hello.

I believe all of the scripting stuff is just using ksh shell
programming, so if you took a look in the helpviewer under ksh, that would
probably work. Others can correct me if I am wrong on this.

That’s completely wrong. There are at least the following scripting
available for QNX4 and QNX6:

Armin



If you need to wait for the command to finish, you might want to
investigate the spawn
commands. If memory serves me correctly, the first argument to spawn
can be set to wait
until the command executed has completed ( ie. P_WAIT ).

Hope that helps.

Rodney Lott

Matt Crowell wrote:

Could somebody point me in the right direction where to find information
on the scripting “language” supported by QNX4.2x. Things like “if test
-b … fi”, etc. that are found in files like the ph script.

Also, I am making a call like “system(dinit -h /dev/hd0t78)” in C++ but
it doesn’t work correctly. I’m thinking the system call is returning
before the true 4GB partition is “dinit’ed”. I am looking for some kind
of confirmation or wait command that the dinit is done. I don’t want to
use “delay(guess a time here)” for obvious reasons.


Matt Crowell
Electrical Engineer

Vamco International, Inc.
555 Epsilon Drive
Pittsburgh, PA. 15238

Phone:412.963.7100
Fax:412.963.9511

Armin Steinhoff wrote:

In article <> 3A40D61C.9969E061@fuelcelltechnologies.ca> >, Rodney says…

Hello.

I believe all of the scripting stuff is just using ksh shell
programming, so if you took a look in the helpviewer under ksh, that would
probably work. Others can correct me if I am wrong on this.

That’s completely wrong. There are at least the following scripting
available for QNX4 and QNX6:

Armin

My apologies for my limited usage of “all”, Armin - I guess I was
referring to all of the sh scripting information found in the help
files, not in regards to other scripting languages, which I believe is
what the fellow was asking about. I will try to be more explicit in
future.

Regards.

Rodney Lott

Try looking at the Utilities online doc at QNX at the following URL:

http://support.qnx.com/support/docs/qnx4/
Look at the sh command.

The “standard” QNX shell is based on the korn88 shell
With this in mind there is a good O’Reilly & Associates book
called “learning the Korn Shell”, although there a few implementation
difference but it provides another perspective.

Often within my programs, I shell out with a system command.
Especially when dealing with files and already available qnx commands
(rather than rewriting)

good luck

Vince

In article <3A5B0D69.15EA18A5@fuelcelltechnologies.ca>,
Rodney Lott <rod@fuelcelltechnologies.ca> wrote:

Armin Steinhoff wrote:

In article <> 3A40D61C.9969E061@fuelcelltechnologies.ca> >, Rodney
says…

Hello.

I believe all of the scripting stuff is just using ksh shell
programming, so if you took a look in the helpviewer under ksh,
that would
probably work. Others can correct me if I am wrong on this.

That’s completely wrong. There are at least the following scripting
available for QNX4 and QNX6:

Armin



My apologies for my limited usage of “all”, Armin - I guess I was
referring to all of the sh scripting information found in the help
files, not in regards to other scripting languages, which I believe is
what the fellow was asking about. I will try to be more explicit in
future.

Regards.

Rodney Lott

Sent via Deja.com
http://www.deja.com/