Re: [AD] Magic main on POSIX systems

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eric Botcazou wrote:

> So I propose that we further explore this path, so as to devise a method for
> each OS we support (the Windows and BeOS ports already do so) and get rid of
> the infamous Magic Main on POSIX systems.

Sounds like a decent plan. However :-)

I don't know if IRIX is POSIX compliant, but looking in /proc, it has
a slightly different idea on what to put in there as linux does. For
each process it has 2 files named by the process number:

/proc/0000056666
/proc/pinfo/0000056666

These files are of type "/proc file, process image file" and are not
readable with more or any other program I tried (cat, etc). It says
'Input error: I/O error (0000056666)' whenever I try to read the file.
Other than these numbered 'image files' the proc directory on my IRIX
system is empty, so unless there is a way of opening these files I
have no clue how to extract path information from them.

A quick check on SunOS 5.8 shows a directory for each process with a
bunch of files, most of which are binary or empty and I don't know the
use of. The only one I can make out is a fd directory with a 'copy' of
each open file the process has in use. I can't see any files to
determine the current working directory or executable name from.

Perhaps someone with more knowledge of /proc systems can shed some
light on this, my knowledge is insufficient.

Hein Zelle

>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-< 
 Unix is user friendly. It's just very particular about who 
 it's friends are.

 Hein Zelle                     hein@xxxxxxxxxx
	                        http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/