Skip navigation.
Home
The QNX Community Portal

View topic - running small program in telnet

running small program in telnet

Discussion about the QNX6 OS.

running small program in telnet

Postby WhiteRabbits » Fri Sep 13, 2013 11:57 am

I compiled a small programm and it runs fine from a login shell.
when I start it from a telnet session, I get the error message 'memory fault - core dumped', and the program exits.

I really don't want you to dig through the code, for a start I would just like to know if this sounds like a 'typical beginner's mistake' and what would be the next step. A short hint will do, since 'm used to learn by myself.

Thank you, Helge
WhiteRabbits
Senior Member
 
Posts: 196
Joined: Sun Aug 03, 2003 9:20 pm
Location: Germany

Re: running small program in telnet

Postby maschoen » Fri Sep 13, 2013 4:53 pm

WhiteRabbits wrote:I compiled a small programm and it runs fine from a login shell.


I assume by "a login shell" you mean a console.

when I start it from a telnet session, I get the error message 'memory fault - core dumped', and the program exits.


So what you should think about is what is different in the two environments. Using telnet, before you run the program, run stty without any parameters. The first line will be something like this:

Name: /dev/ttyp3

This device is a pseudo tty device, in the case of QNX created by devc-pty. While it tries to create an equivalent environment to /dev/con#, it is not identical. It is likely that your program is making an assumption that is wrong in the case of a pseudo-tty.
That's about all I can with this limited information.

I imagine if you put some printf's in your program, and track down where the abend occurs, it will become obvious what is wrong. Alternatively you could use a post-mortem core dump to find this location.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: running small program in telnet

Postby WhiteRabbits » Fri Sep 13, 2013 10:48 pm

thank you for pointing.
I guess I'll have to read some more.
WhiteRabbits
Senior Member
 
Posts: 196
Joined: Sun Aug 03, 2003 9:20 pm
Location: Germany


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 4 guests