QNX

J. Michael Berkley jmberkley at watnext.waterloo.edu
Thu Jul 13 02:55:30 AEST 1989


In article <3505 at altos86.Altos.COM> bahman at nixtor (Bahman Koohestani) writes:

   >QNX has a fork call and it works very efficiently.....

   Yes, QNX does have a fork call; it also works very "efficiently",
   however, it is brain damaged. Why???? Because it is nothing like
   the unix fork() call.  It does not let you pass file descriptors or
   file pointers to the son task. All it does is that it allows you to
   create a son task and then you must re-open] any files that you
   would have expected to inherit from the parent task.

Agreed!  This behaviour comes as a result of one of QNX's other weird
qualities.  QNX's filesystem is fairly fragile, in my opinion, and one
of the things that they have done to enhance stability is a mandatory
file locking concept:

	a) many people can open a file for read
	b) only ONE person can open a file for write,
	c) files cannot be opened for read and write (i.e. you can't
	open it for read if someone has it open for write and you
	can't open it for write if someone has it open for write).

So, of course the child process cannot use the same file descriptors
as the parent - some of those descriptors might be for write.

I found this behaviour very frustrating at times.  Imagine something
like news, where you couldn't unspool news if someone was reading the
active file.  QNX file locking makes this kind of administrative stuff
more difficult.  I never got used to it.

   QNX is a good system for real time (process control) applications,
   it is not as open as unix is in a lot of different ways. fork ()
   also has a lot of other side effects (depending on the version of
   QNX you are working with).  At one point, one could not create a
   background task from another background task..... SO WHAT?

Lest anyone forget, QNX is not Unix.  If you buy QNX expecting fast,
real-time Unix on your PC, you may be disappointed.  However, QNX does
have other features that make it a nice, elegant system to work with,
but it's not Unix.  I prefer Unix, but I could live with QNX if I had
to and needed real-time.

 Mike Berkley, University of Waterloo
 PAMI Lab
 jmberkley at watnext.waterloo.edu
 {utai,uunet}!watmath!watnext!jmberkley



More information about the Comp.unix mailing list