Linux-Development-Apps Digest #411, Volume #7    Thu, 17 May 01 17:13:12 EDT

Contents:
  Re: Cross compiling from Windows to Linux (David Konerding)
  Re: A linuxthreads C++ object question (David Konerding)
  Re: A linuxthreads C++ object question ("Neil Butterworth")
  Re: Cross compiling from Windows to Linux (Sergei Organov)
  Re: A linuxthreads C++ object question (Chris)
  Re: Cross compiling from Windows to Linux (Chris)
  Re: A linuxthreads C++ object question (David Konerding)
  Re: how many CPU's? ("Phil Frisbie, Jr.")
  Re: A linuxthreads C++ object question ("Neil Butterworth")
  Re: transpareny ("Darren LS")
  Which GUI tool kit to use? (Travis Stevens)
  Re: A linuxthreads C++ object question ("Neil Butterworth")
  Re: timeout for non blocking sockets ("Boris")
  Re: asynchronous io
  gcc + generation of an AST (Guillaume)
  Re: Cross compiling from Windows to Linux ("Bill Medland")
  Re: Cross compiling from Windows to Linux ("Bill Medland")
  Re: Cross compiling from Windows to Linux (Jim Cochrane)
  Re: SIGSEGV is not blocking ("Michael J. Saletnik")
  losing stdout after SIGINT ("Clifton T. Sharp Jr.")
  Re: SIGSEGV is not blocking
  Obtaining the full path name of a file? (Timur Tabi)
  Re: A linuxthreads C++ object question (Daniel Barron)

----------------------------------------------------------------------------

From: [EMAIL PROTECTED] (David Konerding)
Subject: Re: Cross compiling from Windows to Linux
Date: 17 May 2001 15:15:51 GMT
Reply-To: [EMAIL PROTECTED]

On Thu, 17 May 2001 14:38:28 +0200, Daniel Lux <[EMAIL PROTECTED]> wrote:
> the cvs like tool we use is called pvcs if this helps.
> would it be possible to start the compilation by using samba 
> or the likes?
> I do have some knowledge on how to do it the other way round 
> (cvs on a linux machine and checking out to a windows machine
> using ssh and wincvs) The thing is, that the windows system is backed up 
> regularly and hosts all our source code.
> 
> We do indeed intend to do editing on Win32 as I am the only 
> one in the company with knowledge of linux (it was hard enough
> convincing the management of using linux in the first place) and
> there are some programmers which are naturally very attached to 
> their Win32 editing tools.

Yes, you could remotely mount the NT filesystem on the Linux box using
the smbfs file system.  Alternatively, you could (as you suggested earlier)
use Cygwin to build a Linux cross-compiler.  This has been done before (do
some web searches on linux and cygwin, and read on the cygwin home page).
But you'll be better off using the remotely mounted filesystem.

Dave

------------------------------

From: [EMAIL PROTECTED] (David Konerding)
Subject: Re: A linuxthreads C++ object question
Date: 17 May 2001 15:13:48 GMT
Reply-To: [EMAIL PROTECTED]

On Wed, 16 May 2001 19:08:23 +0100, Daniel Barron 
<[EMAIL PROTECTED]> wrote:
> With C++ when I create an object in a linuxthreaded app, how careful do I
> need to be with race conditions and the like?  What I mean is, in C (not++)
> an app is just one big lump of code, but in C++ you have descrete objects
> that contain data, variables and code.  So shurely with C++ objects, I
> don't need to worry about concurrent code running as each thread will
> actually be running its own seperate objects and hense code?
> 
> Am I right?  If not, please explain.  If I am also please explain ;)!

First you need to make sure that the standard C++ library (both the standard
library and the standard template library) are thread-safe.  If they are, then you
can happily use all the standard library objects and methods on those objects
from multiple threads simultaneously with no fear of race conditions.  Internally
these libraries protect access to volatile variables and code regions
using locks, mutexes, and semaphoes (typically just mutexs).

With your own code, if two threads both instantiate an object of a particular
type of class, it is possible to have a race condition IF the two instances
contain a shared variable.  For example, if you declare a variable static in the
class definition, then that variable will be shared by all instances and access
by either thread will be touching the same part of memory.  The non-static variables
are allocated on the individual stacks of the two threads, and any access to allocated
heap memory goes through new/malloc, which is thread-safe.  

It is up to you to adaquately protect your static variables within classes, and for 
that
I think you should use mutexes.

Dave

------------------------------

From: "Neil Butterworth" <[EMAIL PROTECTED]>
Subject: Re: A linuxthreads C++ object question
Date: Thu, 17 May 2001 16:29:20 +0100


"David Konerding" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Wed, 16 May 2001 19:08:23 +0100, Daniel Barron
<[EMAIL PROTECTED]> wrote:
> > With C++ when I create an object in a linuxthreaded app, how careful do
I
> > need to be with race conditions and the like?  What I mean is, in C
(not++)
> > an app is just one big lump of code, but in C++ you have descrete
objects
> > that contain data, variables and code.  So shurely with C++ objects, I
> > don't need to worry about concurrent code running as each thread will
> > actually be running its own seperate objects and hense code?
> >
> > Am I right?  If not, please explain.  If I am also please explain ;)!
>
> First you need to make sure that the standard C++ library (both the
standard
> library and the standard template library) are thread-safe.  If they are,
then you
> can happily use all the standard library objects and methods on those
objects
> from multiple threads simultaneously with no fear of race conditions.
Internally
> these libraries protect access to volatile variables and code regions
> using locks, mutexes, and semaphoes (typically just mutexs).

I am not aware of _any_ STL implementation that guarantees this degree of
thread-safety. Certainly, none of these do:

STLport
GNU
SGI
RogueWave
Dinkumware

Which implementation was it you thinking of?

NeilB





------------------------------

From: Sergei Organov <[EMAIL PROTECTED]>
Subject: Re: Cross compiling from Windows to Linux
Date: 17 May 2001 20:00:44 +0400


The fact that unlike Windows Linux is multi-user may help.

I'd suggest the following. Dedicate at least one computer to run Linux. On
this computer make accounts for every Windows user that needs to develop for
Linux. Run Samba server on the computer and export either home directories or
some subdirs in home directories through Samba. Let Windows users edit sources
from within Windows on Samba shares of the Linux machine and then run native
Linux compiler remotely (through telnet/rsh/ssh). Please be warned that you
may have troubles with CR/LF and LF conventions for end-of-line in DOS and
UNIX. Try to configure Samba so that the same files on Samba share were seen
from Windows as DOS text and from Linux as Unix text, -- I recall it's
possible.

Besides, this will make transition to native Linux tools more easy in the
future. For example, you can arrange Windows users to run X servers on their
computers and run XEmacs from Linux machine to do all the work. This way they
have their MSWord/Excell handy and simultaneously can do real work in more
user-friendly environment ;-) This is not actually a joke -- most Windows
programming tools are not designed to be useful for anything but Windows
programming, I'm afraid. This way Windows is used just to draw nice pictures,
i.e., the only thing that it does relatively well.

Also, I'd suggest to switch from PVCS to CVS. Put CVS repository on Linux
machine and access it both from Windows and Linux machines. Arrange to backup
CVS repository from the Linux machine. I've used PVCS before and IMHO CVS is
much better from programmer point of view though it requires some paradigm
shift for those who is used to PVCS in the sense that CVS makes things that
were difficult with PVCS surprisingly easy :-) BTW, there are GUIs for
Windows to work with CVS.

Anyway, try it yourself before adopting something as solution.

Hope it helps.

BR,
Sergei.

Daniel Lux <[EMAIL PROTECTED]> writes:
> the cvs like tool we use is called pvcs if this helps.
> would it be possible to start the compilation by using samba 
> or the likes?
> I do have some knowledge on how to do it the other way round 
> (cvs on a linux machine and checking out to a windows machine
> using ssh and wincvs) The thing is, that the windows system is backed up 
> regularly and hosts all our source code.
> 
> We do indeed intend to do editing on Win32 as I am the only 
> one in the company with knowledge of linux (it was hard enough
> convincing the management of using linux in the first place) and
> there are some programmers which are naturally very attached to 
> their Win32 editing tools.

[...]


------------------------------

From: Chris <[EMAIL PROTECTED]>
Subject: Re: A linuxthreads C++ object question
Date: Thu, 17 May 2001 17:32:15 +0100

David Konerding wrote:
> 
> On Wed, 16 May 2001 19:08:23 +0100, Daniel Barron 
><[EMAIL PROTECTED]> wrote:
> > With C++ when I create an object in a linuxthreaded app, how careful do I
> > need to be with race conditions and the like?  What I mean is, in C (not++)
> > an app is just one big lump of code, but in C++ you have descrete objects
> > that contain data, variables and code.  So shurely with C++ objects, I
> > don't need to worry about concurrent code running as each thread will
> > actually be running its own seperate objects and hense code?
> >
> > Am I right?  If not, please explain.  If I am also please explain ;)!
> 
> First you need to make sure that the standard C++ library (both the standard
> library and the standard template library) are thread-safe.  If they are, then you
> can happily use all the standard library objects and methods on those objects
> from multiple threads simultaneously with no fear of race conditions.  Internally

Errm. That's not what `thread-safe' typically means for
the STL -- see my other post. And to reiterate, unless it
has changed in recent releases, the GNU STL is not thread
safe even in the limited sense that you can operate on two
different objects in two different threads simultaneously.

-- 
Chris Lightfoot -- chris at ex dash parrot dot com -- www.ex-parrot.com/~chris/
 `Canada: Labyrinth of Death' (title of television documentary)

------------------------------

From: Chris <[EMAIL PROTECTED]>
Subject: Re: Cross compiling from Windows to Linux
Date: Thu, 17 May 2001 17:34:45 +0100

Bill Medland wrote:
> 
> find <wherever> -type f -exec dos2unix {} \; (gcc won't like DOS
> end-of-line formats)

Nope, that's fine:

$ perl -e 'print "#include <stdio.h>\r\nint main() {\r\n    printf(\"Hello, 
world\\n\");\r\n}\r\n";' > hd.c
$ od -a !$
od -a hd.c
0000000   #   i   n   c   l   u   d   e  sp   <   s   t   d   i   o   .
0000020   h   >  cr  nl   i   n   t  sp   m   a   i   n   (   )  sp   {
0000040  cr  nl  sp  sp  sp  sp   p   r   i   n   t   f   (   "   H   e
0000060   l   l   o   ,  sp   w   o   r   l   d   \   n   "   )   ;  cr
0000100  nl   }  cr  nl
0000104
$ cc hd.c -o hd
$ ./hd
Hello, world
$ ^D

-- 
Chris Lightfoot -- chris at ex dash parrot dot com -- www.ex-parrot.com/~chris/
 A cynic is a man who, upon smelling flowers, looks around for a coffin.
 (Mencken)

------------------------------

From: [EMAIL PROTECTED] (David Konerding)
Subject: Re: A linuxthreads C++ object question
Date: 17 May 2001 17:46:23 GMT
Reply-To: [EMAIL PROTECTED]

On Thu, 17 May 2001 16:29:20 +0100, Neil Butterworth <[EMAIL PROTECTED]> 
wrote:
> 
> "David Konerding" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
>> On Wed, 16 May 2001 19:08:23 +0100, Daniel Barron
><[EMAIL PROTECTED]> wrote:
>> > With C++ when I create an object in a linuxthreaded app, how careful do
> I
>> > need to be with race conditions and the like?  What I mean is, in C
> (not++)
>> > an app is just one big lump of code, but in C++ you have descrete
> objects
>> > that contain data, variables and code.  So shurely with C++ objects, I
>> > don't need to worry about concurrent code running as each thread will
>> > actually be running its own seperate objects and hense code?
>> >
>> > Am I right?  If not, please explain.  If I am also please explain ;)!
>>
>> First you need to make sure that the standard C++ library (both the
> standard
>> library and the standard template library) are thread-safe.  If they are,
> then you
>> can happily use all the standard library objects and methods on those
> objects
>> from multiple threads simultaneously with no fear of race conditions.
> Internally
>> these libraries protect access to volatile variables and code regions
>> using locks, mutexes, and semaphoes (typically just mutexs).
> 
> I am not aware of _any_ STL implementation that guarantees this degree of
> thread-safety. Certainly, none of these do:
> 
> STLport

STLport-4.1b6 does.  At least, a cursory grep of the software shows many header and 
code
files use mutexes to protect critical sections.

Also, from experience, I am using a threaded application which makes
heavy use of C++ (and the standard library) in both the main thread and
in other threads.


Dave

------------------------------

From: "Phil Frisbie, Jr." <[EMAIL PROTECTED]>
Subject: Re: how many CPU's?
Date: Thu, 17 May 2001 18:44:09 GMT

Not again! This was hashed out in a VERY long thread a couple of weeks ago....

Charles Herman wrote:
> 
> Is there a function I can call that will tell me how many CPU's the
> computer has?
> 
> -charles

 
Phil Frisbie, Jr.
Lead Developer, Hawk Software
http://www.hawksoft.com

------------------------------

From: "Neil Butterworth" <[EMAIL PROTECTED]>
Subject: Re: A linuxthreads C++ object question
Date: Thu, 17 May 2001 20:15:11 +0100

"David Konerding" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Thu, 17 May 2001 16:29:20 +0100, Neil Butterworth
<[EMAIL PROTECTED]> wrote:
> >
> > "David Konerding" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> >> On Wed, 16 May 2001 19:08:23 +0100, Daniel Barron
> ><[EMAIL PROTECTED]> wrote:
> >> > With C++ when I create an object in a linuxthreaded app, how careful
do
> > I
> >> > need to be with race conditions and the like?  What I mean is, in C
> > (not++)
> >> > an app is just one big lump of code, but in C++ you have descrete
> > objects
> >> > that contain data, variables and code.  So shurely with C++ objects,
I
> >> > don't need to worry about concurrent code running as each thread will
> >> > actually be running its own seperate objects and hense code?
> >> >
> >> > Am I right?  If not, please explain.  If I am also please explain ;)!
> >>
> >> First you need to make sure that the standard C++ library (both the
> > standard
> >> library and the standard template library) are thread-safe.  If they
are,
> > then you
> >> can happily use all the standard library objects and methods on those
> > objects
> >> from multiple threads simultaneously with no fear of race conditions.
> > Internally
> >> these libraries protect access to volatile variables and code regions
> >> using locks, mutexes, and semaphoes (typically just mutexs).
> >
> > I am not aware of _any_ STL implementation that guarantees this degree
of
> > thread-safety. Certainly, none of these do:
> >
> > STLport
>
> STLport-4.1b6 does.  At least, a cursory grep of the software shows many
header and code
> files use mutexes to protect critical sections.

The following is taken from the STL website describing thread-safety:

<quote>
- simultaneous read access to the same container from within separate
threads is safe;
- simultaneous access to distinct containers (not shared between threads) is
safe;
- user must provide synchronization for all accesses if any thread may
modify shared container.
 </quote>

This shows that STLport does _not_ provide the level of safety that you
claim it does.

> Also, from experience, I am using a threaded application which makes
> heavy use of C++ (and the standard library) in both the main thread and
> in other threads.

Me too. I had a middle tier CORBA server which used multiple threads waiting
on  semaphore to pull requests off a queue. The app would work perfectly for
weeks at a time and then crash randomly because multiple threads were
accessing the same container. I had to provide a mutex to cure it.

My point is that just because an multi-threaded app appears to work doesn't
mean the libraries it uses are thread safe.

NeilB





------------------------------

From: "Darren LS" <[EMAIL PROTECTED]>
Crossposted-To: 
alt.linux,comp.os.linux.development.system,linux.redhat.devel,linux.redhat.development
Subject: Re: transpareny
Date: Thu, 17 May 2001 20:39:30 +0100


Kasper Dupont <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Darren LS wrote:
> >
> [...]
> >
> > Hi Kasper, thanks but what I would like to do is dump the output to a
vacant
> > tty terminal for debugging purposes
> >
> > Darren
>
> In that case the easiest probably is just to
> start it with the open command from the
> command line. "man 1 open"
>
> Notice that in some distributions open is not
> installed by default. It is really a handy
> tool, so just install it from your CD if it
> is not already installed.
>
> You could also use /dev/ttyXX instead of
> /dev/null in the code from my last post, the
> problem is to find the appropriate value for
> XX. There is an ioctl to get that number, I
> can post some code if you need it.
please do tried some piping to ttyS8 but the system told me not to be stupid

> --
> Kasper Dupont



------------------------------

From: Travis Stevens <[EMAIL PROTECTED]>
Subject: Which GUI tool kit to use?
Date: Thu, 17 May 2001 13:48:52 -0600

Hello all, hope you are doing well.

I have never done GUI programming for linux (except Java.)  I would like
to write a C++ program (a game) with a GUI front end.  Does anyone have
any suggestions on which tool kit I should use, and why?

Thank you
-Trav


------------------------------

From: "Neil Butterworth" <[EMAIL PROTECTED]>
Subject: Re: A linuxthreads C++ object question
Date: Thu, 17 May 2001 20:54:38 +0100

"Neil Butterworth" <[EMAIL PROTECTED]> wrote in message >

> The following is taken from the STL website describing thread-safety:
>

Of course, I meant to say

> The following is taken from the *** STLport *** website describing
thread-safety:

NeilB




------------------------------

From: "Boris" <[EMAIL PROTECTED]>
Subject: Re: timeout for non blocking sockets
Date: Thu, 17 May 2001 22:03:03 +0200


"TdC" <no#[EMAIL PROTECTED]#spam>,
news:mmRM6.85325$[EMAIL PROTECTED]...
> [...]
>   if (select(FD_SETSIZE, NULL, &MySet, NULL, &Interval) != 1)
>   {
>    printf("timeout?\n");
>    break;
>   }

select() returns 0 on timeout. Are you sure you don't get -1 for an error?

Boris



------------------------------

From: [EMAIL PROTECTED] ()
Subject: Re: asynchronous io
Date: Thu, 17 May 2001 20:14:54 -0000

In article <[EMAIL PROTECTED]>,
D. Stimits <[EMAIL PROTECTED]> wrote:

>I'm trying to find out if the aio_read is available, and if so,
>approximately what kernel version it is available from?

Set O_ASYNC and handle SIGIO.

--
http://www.spinics.net/linux

------------------------------

From: Guillaume <[EMAIL PROTECTED]>
Subject: gcc + generation of an AST
Date: Thu, 17 May 2001 16:28:15 -0400


My goal is using the output provided by the option
"-fdump-translation-unit" by gcc in order to carry out analyses on
the AST. Did somebody already work on such a file. I ask the question
because, I think that the generated files are incompletes.
For example, on certain files, it is impossible to find in the tree the
arguments of the functions whereas I find them for others. I carried
out my tests on textutils-2.0g.

Thus, if somebody already used that, could he confirm me that the tree
generated by GCC is incomplete (or if I am wrong).

Thanks,
Guillaume

PS : I use gcc version 2.97 20010122 (experimental) and I compile with g++
my C files.



------------------------------

From: "Bill Medland" <[EMAIL PROTECTED]>
Subject: Re: Cross compiling from Windows to Linux
Date: 17 May 2001 20:23:12 GMT

Chris <[EMAIL PROTECTED]> wrote in article <[EMAIL PROTECTED]>...
> Bill Medland wrote:
> > 
> > find <wherever> -type f -exec dos2unix {} \; (gcc won't like DOS
> > end-of-line formats)
> 
> Nope, that's fine:
> 
> $ perl -e 'print "#include <stdio.h>\r\nint main() {\r\n   
printf(\"Hello, world\\n\");\r\n}\r\n";' > hd.c
> $ od -a !$
> od -a hd.c
> 0000000   #   i   n   c   l   u   d   e  sp   <   s   t   d   i   o   .
> 0000020   h   >  cr  nl   i   n   t  sp   m   a   i   n   (   )  sp   {
> 0000040  cr  nl  sp  sp  sp  sp   p   r   i   n   t   f   (   "   H   e
> 0000060   l   l   o   ,  sp   w   o   r   l   d   \   n   "   )   ;  cr
> 0000100  nl   }  cr  nl
> 0000104
> $ cc hd.c -o hd
> $ ./hd
> Hello, world
> $ ^D
> 
> -- 
> Chris Lightfoot -- chris at ex dash parrot dot com --
www.ex-parrot.com/~chris/
>  A cynic is a man who, upon smelling flowers, looks around for a coffin.
>  (Mencken)
> 
Sorry; I guess I need to be more specific.
If you have a \ at the "end" of a preprocessor line and it is followed by a
dos end-of-line (\r\n) then it is my experience that the preprocessor phase
of gcc on my Linux box will not recognise it as a request to continue onto
the next line.  That fits in with other comments I have seen during the
past few weeks on this or similar newsgroups.

Bill

------------------------------

From: "Bill Medland" <[EMAIL PROTECTED]>
Subject: Re: Cross compiling from Windows to Linux
Date: 17 May 2001 20:27:16 GMT

Sergei Organov <[EMAIL PROTECTED]> wrote in article
<[EMAIL PROTECTED]>...
> 
> The fact that unlike Windows Linux is multi-user may help.
> 
-snip
> may have troubles with CR/LF and LF conventions for end-of-line in DOS
and
> UNIX. Try to configure Samba so that the same files on Samba share were
seen
> from Windows as DOS text and from Linux as Unix text, -- I recall it's
> possible.

I'd appreciate the details!  (My reading of FAQ 1 at samba.org suggests
that it isn't).

snip-


------------------------------

From: [EMAIL PROTECTED] (Jim Cochrane)
Subject: Re: Cross compiling from Windows to Linux
Date: 17 May 2001 14:33:58 -0600

I think some MS development tools, such as Visual C++'s editor, do fine
with UNIX-style text files (no '\r's), so keeping the source in UNIX format
may be a better solution, unless it's hard to convince the MS tools to not
add the \r.

In article <01c0df0f$508d12a0$6f0c10ac@medbi01>,
Bill Medland <[EMAIL PROTECTED]> wrote:
>Chris <[EMAIL PROTECTED]> wrote in article <[EMAIL PROTECTED]>...
>> Bill Medland wrote:
>> > 
>> > find <wherever> -type f -exec dos2unix {} \; (gcc won't like DOS
>> > end-of-line formats)
>> 
>> Nope, that's fine:
>> 
>> $ perl -e 'print "#include <stdio.h>\r\nint main() {\r\n   
>printf(\"Hello, world\\n\");\r\n}\r\n";' > hd.c
>> $ od -a !$
>> od -a hd.c
>> 0000000   #   i   n   c   l   u   d   e  sp   <   s   t   d   i   o   .
>> 0000020   h   >  cr  nl   i   n   t  sp   m   a   i   n   (   )  sp   {
>> 0000040  cr  nl  sp  sp  sp  sp   p   r   i   n   t   f   (   "   H   e
>> 0000060   l   l   o   ,  sp   w   o   r   l   d   \   n   "   )   ;  cr
>> 0000100  nl   }  cr  nl
>> 0000104
>> $ cc hd.c -o hd
>> $ ./hd
>> Hello, world
>> $ ^D
>> 
>> -- 
>> Chris Lightfoot -- chris at ex dash parrot dot com --
>www.ex-parrot.com/~chris/
>>  A cynic is a man who, upon smelling flowers, looks around for a coffin.
>>  (Mencken)
>> 
>Sorry; I guess I need to be more specific.
>If you have a \ at the "end" of a preprocessor line and it is followed by a
>dos end-of-line (\r\n) then it is my experience that the preprocessor phase
>of gcc on my Linux box will not recognise it as a request to continue onto
>the next line.  That fits in with other comments I have seen during the
>past few weeks on this or similar newsgroups.
>
>Bill


-- 
Jim Cochrane
[EMAIL PROTECTED]

------------------------------

Crossposted-To: comp.os.linux.development.system,comp.programming.threads
Subject: Re: SIGSEGV is not blocking
From: "Michael J. Saletnik" <[EMAIL PROTECTED]>
Date: Thu, 17 May 2001 20:37:34 GMT

[EMAIL PROTECTED] (Linus Torvalds) writes:
> Well, the kernel has no alternative. It has to do something. You told it
> not to send the SEGV, so _what_ do you expect it to do?

My expectations all along have been tailored specifically to the
interpretation of POSIX and the documentation provided in the Linux
man pages, relative to the original poster's question of "it does
something different under AIX". These talk about behavior being
undefined after ignoring a SIGSEGV not generated by kill() or raise().

I have been taking "ignoring" to literally mean an ignoring
disposition, as opposed to an attempt to block, and saying that given
the information I have in front of me, in spite of the fact it doesn't
make sense, I didn't see why the original poster can't do it. It was
more of a semantic argument than one of technical feasibility.

That's why I made such statements as:

> >What bothers me is that SIGSEGV was blocked, and yet still
> >delivered, and I want to know why.

And this is a perfectly satisfactory explanation:
 
> deliver it despite the programmer telling it not to

Also note my question:

> Was the block flat-out ignored, or did something else clear the
> block and the pending signal was delivered?

which was meant to question if it was the kernel delivering the signal
anyway, or the kernel or some other layer clearing the block and
refaulting.

The answers to these were not mentioned *anywhere* that I can find
(heck, the man page for signal(7) on my RH6.2 2.2.19 system reads
"Linux 1.3.88 April 14, 1996") and that was my issue.

> The CPU does not
> advance the instruction pointer past the instruction that faulted,

Of course! [slaps self in head] The scary thing is that I knew this,
because otherwise such things as page faults wouldn't work. I got so
wrapped up in "but it doesn't *say* that anywhere" that I totally
blitzed on this fact. I don't know why I presumed the process could
continue in the presence of a cpu-raised segfault; I think I was
considering a point about blocking in the presence of raise(SIGSEGV);
and got sidetracked.

-- 
{michael}

------------------------------

From: "Clifton T. Sharp Jr." <[EMAIL PROTECTED]>
Subject: losing stdout after SIGINT
Date: Thu, 17 May 2001 15:41:15 -0500

Program viewable at <http://www.clifto.com/wx.c>.

I can compile and run the ubiquitous test program found all over the web
that counts ^C presses until a newline is received, so I'm reasonably
sure it's not my kernel (2.2.18) or something systemic. But this program
dies at the system level the first time I tickle stdout after ^C. I can
print to stderr all day, though. I'm positive it has nothing to do with
SIGIO, because the application receives serial data only a few seconds
out of every few minutes, I know when there's data coming, and I've
stopped the program a few thousand times now at times when I'm sure
there's no possibility of a SIGIO event.

Another weirdness: I wasn't aware that the first signal is supposed to
reset the signal vector, so originally I didn't manually reset it; but
my program got SIGIO after SIGIO and never missed a beat.

-- 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Cliff Sharp   |  Hate spam? Take the Boulder Pledge!                      |
|      WA9PDM     | http://www.zdnet.com/yil/content/mag/9612/ebert9612.html  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

------------------------------

From: [EMAIL PROTECTED] ()
Crossposted-To: comp.os.linux.development.system,comp.programming.threads
Subject: Re: SIGSEGV is not blocking
Date: Thu, 17 May 2001 20:52:19 -0000

In article <[EMAIL PROTECTED]>,
Michael J. Saletnik <[EMAIL PROTECTED]> wrote:

>I have been taking "ignoring" to literally mean an ignoring
>disposition, as opposed to an attempt to block, and saying that given
>the information I have in front of me, in spite of the fact it doesn't
>make sense, I didn't see why the original poster can't do it.

It doesn't make sense because there's nothing that can be done.  Do you
understand that problem can't just continue and there's nothing to 
unblock the signal if the problem isn't running?

--
http://www.spinics.net/linux

------------------------------

From: Timur Tabi <[EMAIL PROTECTED]>
Subject: Obtaining the full path name of a file?
Date: Thu, 17 May 2001 15:54:40 -0500

I have an application that takes a list of filenames on the
command-line.  How do I expand these filenames into their full path
name?

For example, assume the current directory is /usr/local/bin.  Then,

ssh -> /usr/local/bin/ssh
../man/whatis -> /usr/local/man/whatis
/boot/vmlinux -> /boot/vmlinux
../../boot/vmlinunx -> /boot/vmlinux

I need to do this from C.

-- 
Timur Tabi
Remove "nospam_" from email address before sending reply
Interactive Silicon - http://www.interactivesi.com

------------------------------

From: Daniel Barron <[EMAIL PROTECTED]>
Subject: Re: A linuxthreads C++ object question
Date: Thu, 17 May 2001 21:11:03 +0100

In message <9dvabg$on8$[EMAIL PROTECTED]>
          "zxj" <[EMAIL PROTECTED]> wrote:

> where can I find the on line tutorial?can you tell me the web site?

http://users.actcom.co.il/~choo/lupg/tutorials/multi-thread/multi-thread.html

[snip]

-- 
Daniel Barron - use [at jadeb.com] for personal replys.


------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list by posting to the
comp.os.linux.development.apps newsgroup.

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-Apps Digest
******************************

Reply via email to