Message from discussion
Trying to port mksh to Coherent
Received: by 10.68.230.98 with SMTP id sx2mr9699039pbc.1.1335719669101;
Sun, 29 Apr 2012 10:14:29 -0700 (PDT)
Path: r9ni112725pbh.0!nntp.google.com!news2.google.com!goblin3!goblin1!goblin.stu.neva.ru!newsfeed.pionier.net.pl!news.man.poznan.pl!not-for-mail
From: Andrzej Popielewicz <va...@icpnet.pl>
Newsgroups: comp.os.coherent
Subject: Re: Trying to port mksh to Coherent
Date: Sun, 29 Apr 2012 19:14:26 +0200
Organization: POZMAN - http://www.man.poznan.pl/
Lines: 45
Message-ID: <jnjsti$rfm$1@sunflower.man.poznan.pl>
References: <676e3fc3-19d5-4562-a827-6a7a552e9b1a@ot8g2000pbb.googlegroups.com> <fbfe2771-3c50-416b-98b0-ca2a69889b03@w9g2000pbm.googlegroups.com> <jndceo$p0s$1@sunflower.man.poznan.pl> <517587ef-8aa2-45d1-b061-9b2318387eb7@iu9g2000pbc.googlegroups.com>
NNTP-Posting-Host: d151-144.icpnet.pl
Mime-Version: 1.0
X-Trace: sunflower.man.poznan.pl 1335719666 28150 109.173.151.144 (29 Apr 2012 17:14:26 GMT)
X-Complaints-To: tomjab@man.poznan.pl
NNTP-Posting-Date: Sun, 29 Apr 2012 17:14:26 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.24 (X11/20100623)
In-Reply-To: <517587ef-8aa2-45d1-b061-9b2318387eb7@iu9g2000pbc.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Roy pisze:
> I wonder if sigsuspend() should be same as sigprocmask(SIG_SETMASK,
In Coherent it should have the same result.
But returning to the main problem . I assume that You suspect that
sigsuspend is broken. Well, so far as I can estimate this signal
handling in Coherent is quite well compatible with SYSV and Posix
standards.
You mentioned similar problem in other OS, which was fixed. This fixed
problem concerns threads and Coherent does not have threads and
"translating" this fix to processes is not quite obvious if at all
making sense.
I have analysed Your package. I could build mksh using gcc-2.8.1 and
gcc-3.2.3 and I did not notice any problems with sigsuspend. I did NOT
use Your option D_NOPROSPECTFORWORK nor D_NOEMPLOYED. I have removed
this option from Your mk.sh. I have added LDFLAGS="-L/usr/lib -lsocket
-lcoh -L/lib/ndp -lc -lm" , where libcoh.a is my own library of utility
functions and libsocket.a is original from mwc. I have have removed
option -DUSE_TERMIO.
Unfortunalety mksh built in such a way does not work. I observe the message
internal error, roque pointer 8C8 !!!
Never seen such message, although I have ported hundreds of packages.
BTW , the same meesage is produced if I use Your option -D_NOPROSPECTS...
Concluding I do not think the problem is related to sigsuspend, of
course I may be wrong.
BTW , the missing functions like lstat, readlink . tcgpgrp, etc I have
supplied in the form of wrappers, for example my lstat uses stat ,
readlink returns -1 and errno is set to EINVAL etc. This method is oft
used, because You do not have to change the original source code.
Andrzej