× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



What is the command line you are using to start up the daemon?

Mike

On Mon, 10 Apr 2000, Scott Klement wrote:

> 
> I'm checking out lp5250d...   and attempting to port it to FreeBSD.
> I'm always the last to try these things, arent I? :)
> 
> When I specify a tracefile with the -t option, lp5250d crashes with a
> "bus error", and dumps core.  Taking a look at the core dump, I see that
> it is crashing on this statement:
>      strcpy(logname, optarg);
> which occurs around line 114 of lp5250d.c
> 
> The reason for this appears to be the statement:
>      char logname[20] = "";
> which occurs around line 50 of lp5250d.c
> 
> Now, I'm primarily an AS/400 RPG programmer, so correct me if I'm wrong,
> but is that even valid syntax in C?   If it is, isn't it telling the
> compiler to make a 1-byte constant that just contains a string terminator,
> and then change the address of the logname variable to be the same as
> that constant?   
> 
> At any rate, changing the line to:
>      char logname[20];
> and adding a line at the top of main():
>      logname[0] = '\0';
> 
> appears to solve this problem.   But... is it really desirable to have
> logname be only 20 chars long?  Is it really a good idea to strcpy to such
> a small area of memory, when it'd be so easy to type a pathname longer
> than 20 bytes that'd cause it to overflow?  
> 
> 
> NEXT PROBLEM...  (and the reason I wanted a tracefile...)
> 
> When I start up lp5250d, it connects to the AS/400 just fine.  It starts
> the print writer, and I am able to send a printout to it.   The printout
> gets downloaded and removed from the spool.  so far so good, right?
> 
> But then it doesnt print.   At all.   The daemon appears to have stopped
> running after it gets the data, as it no longer shows up in my "ps".  
> I look at the tracefile, and there are no errors there.
> 
> I'll keep looking at it, maybe I can figure out whats happening...  but I
> thought I'd say something, in case someone out there knows why it might
> die silently without telling me whats wrong...
> 
> Thanks!
> 
> 
> 
> +---
> | This is the LINUX5250 Mailing List!
> | To submit a new message, send your mail to LINUX5250@midrange.com.
> | To subscribe to this list send email to LINUX5250-SUB@midrange.com.
> | To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
> 

+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.