Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Trying to port mksh to Coherent
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 43 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Roy  
View profile  
 More options Apr 25 2012, 11:10 pm
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Wed, 25 Apr 2012 20:10:25 -0700 (PDT)
Local: Wed, Apr 25 2012 11:10 pm
Subject: Trying to port mksh to Coherent
Hi all,

I tried to port mksh to Coherent, and I hit some issues:
- there is no gettimeofday() and I used time() instead
- there is no termios.h and I tried to use termio.h instead (for
tcgetattr() and tcsetattr())
- there is no tcgetpgrp() and tcsetpgrp() so I disabled job control
- there is no lstat() and readlink(), I used stat() and failing the
readlink() line

- the Build.sh script cannot generate a list of signals because it
seems that sed fails to print the tab char (0x9). I tried gnu sed 2.05
too but the problem still (both 2.03 and 2.05 works in other platform,
so I think it is a bug in Coherent 4.2.10 kernel)
- for workarounding the above issue, I removed the sed line and make
use of gawk to get a list. It successfully got some of them, and then
I got "Build.sh: line 1824: Unable to preserve redirection state when
redirecting builtin" and "grep: (standard input): bad file number"

- Signals are broken (build with -DMKSH_UNEMPLOYED(for disabling job
controls) but not -DMKSH_NOPROSPECTOFWORK, it will generate binary,
but when you run external command like "ls", it will never return to
shell prompt. actually bash-1.13 coherent port is also affected which
fails to get correct exit status from gcc in Build.sh) but with -
DMKSH_NOPROSPECTOFWORK it works. (Note that this option produces a
shell not supporting standard Korn Shell scripts.)

Result binary + source (built with -DMKSH_NOPROSPECTOFWORK):
http://roy.orz.hm/soft/mksh-coh.tgz

Best regards,
Roy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 26 2012, 2:13 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Thu, 26 Apr 2012 08:13:14 +0200
Local: Thurs, Apr 26 2012 2:13 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-26 05:10, Roy pisze:

> Hi all,

> I tried to port mksh to Coherent, and I hit some issues:
> - there is no gettimeofday() and I used time() instead

gettimeofday can be found in libsocket.a , available in coherent
internet archives

> - there is no termios.h and I tried to use termio.h instead (for

termios.h and termios library can be found in coherent internet archives

> tcgetattr() and tcsetattr())
> - there is no tcgetpgrp() and tcsetpgrp() so I disabled job control

some of the above can be found in coherent archives

Good starting point is www.tuhs.org

In general , You will find a lot of missing functions in glibc. Download
glibc  sources and try to port missing functions. It is one of my
favourite methods when I port something. If something is missing I look
in glibc first.

> - there is no lstat() and readlink(), I used stat() and failing the
> readlink() line

It is obvious, coherent does not support symbolic links

> Best regards,
> Roy

Andrzej

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 26 2012, 2:28 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Thu, 26 Apr 2012 08:28:16 +0200
Local: Thurs, Apr 26 2012 2:28 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-26 05:10, Roy pisze:

> Hi all,

> I tried to port mksh to Coherent, and I hit some issues:
> - there is no gettimeofday() and I used time() instead
> - there is no termios.h and I tried to use termio.h instead (for
> tcgetattr() and tcsetattr())
> - there is no tcgetpgrp() and tcsetpgrp() so I disabled job control
> - there is no lstat() and readlink(), I used stat() and failing the
> readlink() line

try this in Your browser

http://gopher.floodgap.com/gopher/gw?gopher://telefisk.org:70/1

It is gopher server maintaing among other stuff Coherent archive too.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 26 2012, 2:39 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Thu, 26 Apr 2012 08:39:17 +0200
Local: Thurs, Apr 26 2012 2:39 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-26 05:10, Roy pisze:

> Hi all,

> I tried to port mksh to Coherent, and I hit some issues:
> - there is no gettimeofday() and I used time() instead
> - there is no termios.h and I tried to use termio.h instead (for

http://gopher.floodgap.com/gopher/gw?gopher://telefisk.org:70/1/coher...

termios stuff is in above directory.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 26 2012, 4:08 am
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Thu, 26 Apr 2012 01:08:26 -0700 (PDT)
Local: Thurs, Apr 26 2012 4:08 am
Subject: Re: Trying to port mksh to Coherent
On Apr 26, 2:13 pm, andrzej Popielewicz <va...@icpnet.pl> wrote:

> W dniu 2012-04-26 05:10, Roy pisze:

> > Hi all,

> > I tried to port mksh to Coherent, and I hit some issues:
> > - there is no gettimeofday() and I used time() instead

> gettimeofday can be found in libsocket.a , available in coherent
> internet archives

I can't get libsocket compiling in 4.2.10, it complains there is no
NOFILE defined.

Tried, the main problem is the signal one. I can see that bash-1.13.5
and mksh are affected.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 26 2012, 4:30 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Thu, 26 Apr 2012 10:30:24 +0200
Local: Thurs, Apr 26 2012 4:30 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-26 10:08, Roy pisze:

> On Apr 26, 2:13 pm, andrzej Popielewicz<va...@icpnet.pl>  wrote:
>> gettimeofday can be found in libsocket.a , available in coherent
>> internet archives

> I can't get libsocket compiling in 4.2.10, it complains there is no
> NOFILE defined.

As far as I remember I also had problems with compiling libsocket.
Finally it compiled but did not work as original compiled version. So I
am using original libsocket.a .
NOFILE should be defined somewhere in the /usr/include .If not find it
in include files of glibc or define it Yourself.It is the maksimum
number of opened files,I suspect number about of order of 64 (?)  it
must be somewhere in /usr/include, perhaps with slightly changed name.
The location of include files in Coherent does not have to be same as in
glibc world.

> Tried, the main problem is the signal one. I can see that bash-1.13.5
> and mksh are affected.

There is also original bash version in the archives.Did You try this ?
It dose not mean signal system in Coherent is perfect. Many features are
missing .
As far as I know the option You use in mksh can allow to track signal
bugs. Try to locate where the bugs happen and what is their nature.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 26 2012, 7:12 am
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Thu, 26 Apr 2012 04:12:58 -0700 (PDT)
Local: Thurs, Apr 26 2012 7:12 am
Subject: Re: Trying to port mksh to Coherent
On Apr 26, 4:30 pm, andrzej Popielewicz <va...@icpnet.pl> wrote:

I used the bash-1.13.5.tgz in gopher://telefisk.org/1/coherent/sources32/system/
I can see bash fails the same as bash in BeOS 5.0 (Build.sh exits
after "if the compiler does not fail correctly... no")


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrzej Popielewicz  
View profile  
 More options Apr 26 2012, 3:27 pm
Newsgroups: comp.os.coherent
From: Andrzej Popielewicz <va...@icpnet.pl>
Date: Thu, 26 Apr 2012 21:27:45 +0200
Local: Thurs, Apr 26 2012 3:27 pm
Subject: Re: Trying to port mksh to Coherent

>> W dniu 2012-04-26 10:08, Roy pisze:
> I used the bash-1.13.5.tgz in gopher://telefisk.org/1/coherent/sources32/system/

You can try the same version of bash , but ported by me, of course no
warranty that it helps

http://www.landibase.com/coherent.html

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 26 2012, 9:22 pm
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Thu, 26 Apr 2012 18:22:42 -0700 (PDT)
Local: Thurs, Apr 26 2012 9:22 pm
Subject: Re: Trying to port mksh to Coherent
On Apr 27, 3:27 am, Andrzej Popielewicz <va...@icpnet.pl> wrote:

> >> W dniu 2012-04-26 10:08, Roy pisze:
> > I used the bash-1.13.5.tgz in gopher://telefisk.org/1/coherent/sources32/system/

> You can try the same version of bash , but ported by me, of course no
> warranty that it helps

> http://www.landibase.com/coherent.html

Both bash1 and 2 from you exit after same message when running
Build.sh.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 26 2012, 9:46 pm
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Thu, 26 Apr 2012 18:46:34 -0700 (PDT)
Local: Thurs, Apr 26 2012 9:46 pm
Subject: Re: Trying to port mksh to Coherent
On Apr 26, 11:10 am, Roy <roy...@gmail.com> wrote:

> - Signals are broken (build with -DMKSH_UNEMPLOYED(for disabling job
> controls) but not -DMKSH_NOPROSPECTOFWORK, it will generate binary,
> but when you run external command like "ls", it will never return to
> shell prompt. actually bash-1.13 coherent port is also affected which
> fails to get correct exit status from gcc in Build.sh) but with -
> DMKSH_NOPROSPECTOFWORK it works. (Note that this option produces a
> shell not supporting standard Korn Shell scripts.)

In ps -alx, it shows that mksh is idle-waiting sigsuspend, so that's
the problem."that is a hint that mksh never gets the SIGCHLD, see also
http://dev.haiku-os.org/ticket/5567, Haiku had the same problem, but
fixed it" said tg.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 27 2012, 1:56 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Fri, 27 Apr 2012 07:56:39 +0200
Local: Fri, Apr 27 2012 1:56 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-27 03:46, Roy pisze:

> In ps -alx, it shows that mksh is idle-waiting sigsuspend, so that's

OK, it is precise enough I hope to try to fix it. I will look at it.
Thanks for the valuable signal.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 27 2012, 2:22 am
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Thu, 26 Apr 2012 23:22:47 -0700 (PDT)
Local: Fri, Apr 27 2012 2:22 am
Subject: Re: Trying to port mksh to Coherent
On Apr 27, 1:56 pm, andrzej Popielewicz <va...@icpnet.pl> wrote:

> W dniu 2012-04-27 03:46, Roy pisze:

> > In ps -alx, it shows that mksh is idle-waiting sigsuspend, so that's

> OK, it is precise enough I hope to try to fix it. I will look at it.
> Thanks for the valuable signal.

If you can fix the kernel, please let it make use of "HLT" op in its
idle loop so that it won't keep the core in full load.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 27 2012, 11:55 am
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Fri, 27 Apr 2012 08:55:41 -0700 (PDT)
Local: Fri, Apr 27 2012 11:55 am
Subject: Re: Trying to port mksh to Coherent
On Apr 27, 1:56 pm, andrzej Popielewicz <va...@icpnet.pl> wrote:

> W dniu 2012-04-27 03:46, Roy pisze:

> > In ps -alx, it shows that mksh is idle-waiting sigsuspend, so that's

> OK, it is precise enough I hope to try to fix it. I will look at it.
> Thanks for the valuable signal.

> Andrzej

I wonder if sigsuspend() should be same as sigprocmask(SIG_SETMASK,
&set, &oset); pause(); sigprocmask(SIG_SETMASK, &oset, NULL); ?
I don't know why sigsuspend() is broken in BeOS 5.0 and Coherent.

Roy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrzej Popielewicz  
View profile  
 More options Apr 29 2012, 1:14 pm
Newsgroups: comp.os.coherent
From: Andrzej Popielewicz <va...@icpnet.pl>
Date: Sun, 29 Apr 2012 19:14:26 +0200
Local: Sun, Apr 29 2012 1:14 pm
Subject: Re: Trying to port mksh to Coherent
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrzej Popielewicz  
View profile  
 More options Apr 29 2012, 1:42 pm
Newsgroups: comp.os.coherent
From: Andrzej Popielewicz <va...@icpnet.pl>
Date: Sun, 29 Apr 2012 19:42:43 +0200
Local: Sun, Apr 29 2012 1:42 pm
Subject: Re: Trying to port mksh to Coherent
Roy pisze:

> On Apr 27, 1:56 pm, andrzej Popielewicz <va...@icpnet.pl> wrote:
>> W dniu 2012-04-27 03:46, Roy pisze:
> I wonder if sigsuspend() should be same as sigprocmask(SIG_SETMASK,

Read this from Linux man, it concerns also Coherent

http://linux.die.net/man/2/sigsuspend

Essential is that sigsupend waits for the signal, for which signal
handler was defined.

Notice also the possible role of sigprocmask.

If You look at the source code of mksh, if option -D_NOPROSPECTSTOWORK
is NOT used, than both sigprocmask and sigsuspend are used.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrzej Popielewicz  
View profile  
 More options Apr 29 2012, 1:52 pm
Newsgroups: comp.os.coherent
From: Andrzej Popielewicz <va...@icpnet.pl>
Date: Sun, 29 Apr 2012 19:52:59 +0200
Local: Sun, Apr 29 2012 1:52 pm
Subject: Re: Trying to port mksh to Coherent
Andrzej Popielewicz pisze:

> internal error, roque pointer 8C8 !!!

I would suggest , that mksh has internal problems with memory access.
Something tries to write to the memory range allocated by malloc and
this write operation is in some way not correct, for example exceeds the
allowed range of memory addresses.
One should look in other words for memory corruption, buffer overflow
etc, I suspect.Sometimes last byte of character string euqal to '\0' is
written to the memory address , which was not allocated, the allocated
storage was one byte too short etc, just to mention an example..

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 29 2012, 10:16 pm
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Sun, 29 Apr 2012 19:16:14 -0700 (PDT)
Local: Sun, Apr 29 2012 10:16 pm
Subject: Re: Trying to port mksh to Coherent
On Apr 30, 1:14 am, Andrzej Popielewicz <va...@icpnet.pl> wrote:

please release gcc-2.8.1 and gcc-3.2.3 binary packages for testing.
I'm using gcc-2.5.6 from gnu[1234].c.c++.dd, with ld.pre11 as /bin/ld
-DMKSH_UNEMPLOYED is needed if OS doesn't support tc[gs]etpgrp()
calls.

> 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...

not found in mksh source, this should be message from kernel/libc.
and I haven't seen this in my binary. (although I'm using your
4.2.10ap 128MB-enabled kernel)
Build log: http://roy.orz.hm/soft/mksh-logs/build-coherent4210-no_sigsuspend_fix...
(I hacked Build.sh for having correct signal list output)
Test log: http://roy.orz.hm/soft/mksh-logs/test-coherent4210-no_sigsuspend_fake...
(I created a wrapper for /bin/ln faking symbolic links, therefore cd-
pe test have to be disabled because of recursive directory loop)

> 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.

"failing" tc[gs]etpgrp() cannot fool mksh for having jobs control.
pdksh in coherent has no jobs control compiled.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 29 2012, 10:45 pm
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Sun, 29 Apr 2012 19:45:32 -0700 (PDT)
Local: Sun, Apr 29 2012 10:45 pm
Subject: Re: Trying to port mksh to Coherent
On Apr 30, 1:14 am, Andrzej Popielewicz <va...@icpnet.pl> wrote:

and you may redownload mksh-coh.tgz which is based on author's
internal version having #ifdef for using sigprocmask()+pause()
+sigprocmask() instead of sigsuspend(), which works in Coherent/
Syllable Desktop/BeOS 5.0.

in original code, sigsuspend(&sm_default) and sm_default is set by
sigemptyset(), that means sigsuspend() should return when any signal
is raised (child exit should raise SIGCLD), but sigsuspend() doesn't
return and pause() does return. "so it(mksh)'s definitely a check tool
for kernel bugs" said by tg(author of mksh).

Roy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 29 2012, 10:49 pm
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Sun, 29 Apr 2012 19:49:28 -0700 (PDT)
Local: Sun, Apr 29 2012 10:49 pm
Subject: Re: Trying to port mksh to Coherent
On Apr 30, 10:16 am, Roy <roy...@gmail.com> wrote:

the test log should be: http://roy.orz.hm/soft/mksh-logs/test-coherent4210-no_sigsuspend_fake...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roy  
View profile  
 More options Apr 29 2012, 11:54 pm
Newsgroups: comp.os.coherent
From: Roy <roy...@gmail.com>
Date: Sun, 29 Apr 2012 20:54:29 -0700 (PDT)
Local: Sun, Apr 29 2012 11:54 pm
Subject: Re: Trying to port mksh to Coherent
On Apr 30, 10:45 am, Roy <roy...@gmail.com> wrote:

forgot to mention: Build.sh in this package requires GNU grep in name
"ggrep" because Coherent grep doesn't seem to work with the search
criteria that Build.sh uses.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 30 2012, 2:08 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Mon, 30 Apr 2012 08:08:45 +0200
Local: Mon, Apr 30 2012 2:08 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-30 05:54, Roy pisze:

> forgot to mention: Build.sh in this package requires GNU grep in name

I am using gnu grep.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 30 2012, 2:37 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Mon, 30 Apr 2012 08:37:43 +0200
Local: Mon, Apr 30 2012 2:37 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-30 04:16, Roy pisze:

> please release gcc-2.8.1 and gcc-3.2.3 binary packages for testing.
> I'm using gcc-2.5.6 from gnu[1234].c.c++.dd, with ld.pre11 as /bin/ld

As I told many times, I will release almost everything , for example in
the form of CD or DVD image, after Robert is ready with his OpenCoherent
license. On the other hand I could imagine thousands of questions, as I
can see in this small  case.
I have about 20 GB if not more of different versions of different packages.
And I am not going to make any choice. Just release everything.
Other problem, there is no warranty it will work in standard Coherent. I
would have to test it before and it all costs time and hardware.And I am
not planning for sure to test it if it works in emulator etc etc. Not so
easy.

> -DMKSH_UNEMPLOYED is needed if OS doesn't support tc[gs]etpgrp()

I understand. But You can write Your own dummy routines, as I mentioned
in my post.They will return -1.
But the code will be linkable and You can always add real life into
these functions later.

> not found in mksh source, this should be message from kernel/libc.
> and I haven't seen this in my binary. (although I'm using your
> 4.2.10ap 128MB-enabled kernel)

Yes, of course, I did not claim its is a message produced by mksh. But
the message suggests the nature of problems the system has with running
this program, it means program does something which is not acceptable
for the system.

But generally the phenomennon is not quite new, I had such cases.
Program linked but it did not work, for example crashed or even said
"cannot execute". Sometimes solution was found and sometimes not. I am
not dye-hard porter, if something does not work I leave it and take
another project, after some time I come back and perhaps solution is found.

What is interesting if I use gcc-4.4.6, the mksh does not produce this
message but the program loops, in the sense, that it consumes CPU time,
as observed on other terminal and the system is very slow. But gcc-4.4.6
is rather an experimental and I have more confidence in gcc-2.8.1 and
gcc-3.2.3.

> (I created a wrapper for /bin/ln faking symbolic links, therefore cd-
> pe test have to be disabled because of recursive directory loop)

I use also this trick in my system.Sometimes "ln" is simply a "cp".

> "failing" tc[gs]etpgrp() cannot fool mksh for having jobs control.
> pdksh in coherent has no jobs control compiled.

Yes. But I have also implemented these functions. In any case in both
cases , real or dummy functions ,effects are the same.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 30 2012, 2:55 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Mon, 30 Apr 2012 08:55:27 +0200
Local: Mon, Apr 30 2012 2:55 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-30 04:45, Roy pisze:

> On Apr 30, 1:14 am, Andrzej Popielewicz<va...@icpnet.pl>  wrote:
>> Roy pisze:

> and you may redownload mksh-coh.tgz which is based on author's
> internal version having #ifdef for using sigprocmask()+pause()
> +sigprocmask() instead of sigsuspend(), which works in Coherent/
> Syllable Desktop/BeOS 5.0.

OK, I will check it.

> in original code, sigsuspend(&sm_default) and sm_default is set by
> sigemptyset(), that means sigsuspend() should return when any signal
> is raised (child exit should raise SIGCLD), but sigsuspend() doesn't
> return and pause() does return. "so it(mksh)'s definitely a check tool
> for kernel bugs" said by tg(author of mksh).

Not so fast. If something does not work it does not mean kernel is bad.
In 99% such cases usually there is program which is wrong.

If sigsuspend is not returning in the case of SIGCHLD signal, it means
there were no signal handler defined for SIGCHLD. You can write simple
program, with and without signal handler defined.If child sends SIGCHLD
signal, waitpid always will "detect" this, it means will return with -1
and EINTR error. I have tested it, so I assume Coherent kernel behaves
correctly , at least as I can understand this now.

So You have to analyse whether in the case You use sigsuspend , the
signal handler for SIGCHLD is active, I mean explictly defined with no
SIG_IGN or SIG_DFL.
The default behaviour of Coherent kernel is to ignore SIGCHLD, but only
in the case of SIG_IGN or SIG_DFL action.If signal handler is explictly
defined with nontrivial action, signal is not ignored and waitpid
detects it.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 30 2012, 3:55 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Mon, 30 Apr 2012 09:55:26 +0200
Local: Mon, Apr 30 2012 3:55 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-30 04:45, Roy pisze:

> On Apr 30, 1:14 am, Andrzej Popielewicz<va...@icpnet.pl>  wrote:
>> Roy pisze:
> and you may redownload mksh-coh.tgz which is based on author's
> internal version having #ifdef for using sigprocmask()+pause()
> +sigprocmask() instead of sigsuspend(), which works in Coherent/
> Syllable Desktop/BeOS 5.0.

So You suggest, that in this case mksh behaves OK ?

As I said I will check it. Logically this construction is handled by
Coherent kernel in the same way as sigsuspend. Although there are some
technical differences.
If this case is really working I will try to fix sigsuspend
correspondingly simply by removing these differences.
Obvious difference is that sigsuspend is more "atomic", it is one system
call. And above construction consists of 3 system calls.This difference
cannot be removed.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrzej Popielewicz  
View profile  
 More options Apr 30 2012, 3:05 am
Newsgroups: comp.os.coherent
From: andrzej Popielewicz <va...@icpnet.pl>
Date: Mon, 30 Apr 2012 09:05:27 +0200
Local: Mon, Apr 30 2012 3:05 am
Subject: Re: Trying to port mksh to Coherent
W dniu 2012-04-30 08:55, andrzej Popielewicz pisze:

> W dniu 2012-04-30 04:45, Roy pisze:
> You can write simple
> program, with and without signal handler defined.If child sends SIGCHLD
> signal, waitpid always will "detect" this, it means will return with -1
> and EINTR error. I have tested it, so I assume Coherent kernel behaves
> correctly , at least as I can understand this now.

Of course waitpid will detect this SIGCHLD signal if signal handler is
explicitly defined , and wil NOT detect if signal handler is not
defined. By defined handler I mean not only signal statement or
sigaction statement. But also the function body of the handler.
An the handler body can be empty, it is enough that it does exist, is
not NULL.
Sometimes one uses wait or waitpid in the handlers body.

Andrzej


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 43   Newer >
« Back to Discussions « Newer topic     Older topic »