Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

The QNX Operating System


September 1991/The QNX Operating System/Sidebar

At The Shell Prompt


The following text illustrates the network transparency of the QNX operating system from the perspective of the shell prompt by showing some of the possibilities of how the sample programs could be run. Consider running the programs as follows by first typing

holder &
at the shell prompt in order to run the holder program in background mode. The & causes the program to be run in the background. You would then run the sender program by typing its name and one of the arguments that it will accept at the shell prompt. For example:

sender t="This is a text string"
would result in the sender task sending the text string in a message to the holder task which would store it in a buffer. Typing:

sender -query
at the shell prompt would result in a message being sent to the holder task to request it to reply with the text message that it has stored in its buffer. Typing

sender -kill
at the shell prompt would result in a message being sent to the holder task requesting that it commit suicide. All the examples so far would cause both programs to run on the same computer that the user was currently logged in to. Under the QNX operating system, you can run your programs anywhere on the network, limited only by your access permissions which are set by the system administrator. Consider the following example: Assume that you are sitting at node 5 on a QNX network. If you type the following at the shell prompt:

[2] holder &
[3] sender t="This is a text string"
the holder program would be loaded from your current node (5) and run on node 2. Likewise, the sender program would also be loaded from your current node, but it would run on node 3. The screen output from sender would be redirected from node 3 and would print on your own screen at node 5. If you wanted to run a program on a given node and have it's stdin, stdout, and stderr be associated with particular device (terminal, or screen) on that node you could type:

ontty [3]$tty4 sender t="This is a string"
This would load the program from your current node and run it on node 3. The stdin, stderr and stdout associated with that task would be directed to $tty4 (which may happen to be a virtual screen or a terminal). It is also possible to pipe or redirect input and output by using the familiar >, >>, <, << and | characters.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.