ts-7000
[Top] [All Lists]

[ts-7000] Re: segmentation fault at the end main function

To:
Subject: [ts-7000] Re: segmentation fault at the end main function
From: "Damir Dzemidzic" <>
Date: Mon, 29 Jun 2009 15:22:55 -0000


Donal, I suppose you are quite right I should return value even at the end of main(). But it was not the cause of the problem. The optimization is not cause either as Jim recommended to check. I had the optimization set to NULL. Jim, thanks for suggestion of  using sleep(1) but did not gimme an insight either.  So here is the strace output


write(1, "Creating com port\n", 18Creating com port
)     = 18
write(1, "Created port OK\n", 16Created port OK
)       = 16
open("/dev/ttyS1", O_RDWR|O_NONBLOCK|O_NOCTTY) = 3
fcntl64(3, F_SETFL, O_RDONLY)           = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0
write(1, "COM2 port has been sucessfully o"..., 74COM2 port has been sucessfully
 opened. Descriptor is: 3Opened com port OK
) = 74
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 -opost -isig -icanon -echo ...}
) = 0
ioctl(3, TCFLSH, 0)                     = 0ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) =
 0
write(3, "Testing", 7)                  = 7
close(3)                                = 0
write(1, "Closed com port\n", 16Closed com port
)       = 16
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Looks not much to me.

One thing left is that I have't commented out the getty process on ttyS1 in the /etc/inittab. Perhaps closing fd,   may interfere with it. But actual terminal ttyS1 has no problems of working with user.


 



__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU