UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2002-08-22 07:11 AM

emihaly
Member
Registered: 2002-08-01
Posts: 191

Re: copatibility

is this code multiplatform safe? i alway use gcc ...

Offline

#2 2002-08-22 07:18 AM

mlampkin
Administrator
From: Sol 3
Registered: 2002-06-12
Posts: 911
Website

Re: copatibility

What code?

If you stick to the basic BSD (networking), SRV4 and  POSIX standards you should be fine... if you drift out of those, you'll probably start hitting compatibility problems...

But again... um... what code ?!

;-)

ML


"The only difference between me and a madman is that I'm not mad."

Salvador Dali (1904-1989)

Offline

#3 2002-08-22 02:38 PM

emihaly
Member
Registered: 2002-08-01
Posts: 191

Re: copatibility

hops sorry, it was reply for another session - about keyboard hit which write robs. one more time sorry. Also i have, i think last problem:

Log writing to log. i use this code:

openlog("testik",LOG_NDELAY,LOG_LOCAL1);
syslog(LOG_NOTICE,"%d:%d:%d %s",b->tm_hour,b->tm_min,b->tm_sec,Msg);

i go to var/log/ but file testik not found :( where syslogd create files? And also when i put little more logs, it go write to disk and write and write. syslog command in c is not cached? like setvbuffer?

Offline

#4 2002-08-22 03:09 PM

HectorLasso
Administrator
From: Colombia
Registered: 2002-06-12
Posts: 353

Re: copatibility

local1.notice                           /var/log/your_log_filename

Offline

#5 2002-08-23 09:26 AM

emihaly
Member
Registered: 2002-08-01
Posts: 191

Re: copatibility

thanx, now works under LOG_LOCAL0, but it write to file and screen too! I dont want screen report. i try use some flags, but screen report alway aviable  :oops:

Offline

#6 2002-08-23 10:08 AM

mlampkin
Administrator
From: Sol 3
Registered: 2002-06-12
Posts: 911
Website

Re: copatibility

...find a really TALL bridge and just throw myself off of it...

>>argh<<

New rule... Michael erases messages from this section from now on which do not have to do SPECIFICALLY with threaded (as in pthreads) programming...

Thanks :-)


"The only difference between me and a madman is that I'm not mad."

Salvador Dali (1904-1989)

Offline

#7 2002-08-23 03:01 PM

emihaly
Member
Registered: 2002-08-01
Posts: 191

Re: copatibility

I do it in thread! but, ok,  :wink:

Offline

#8 2002-08-26 03:11 PM

HectorLasso
Administrator
From: Colombia
Registered: 2002-06-12
Posts: 353

Re: copatibility

Eduard,

The problem is not in your code but in the syslogd daemon configuration file.

If you find something like:

*.emerg                      root


send all emergency messages to user root (if he/she is logged)
or

facility.priority             *


send all facility.priority (and above) messages to all logged users
or

facility.priority             /dev/console


send all facility.priority (and above) messages to the console

I suggest you check your syslog.conf file.

Offline

Board footer

Powered by FluxBB