Re: SVR4 missing syscall

2000-11-21 Thread Walter C. Pelissero
Mark Newton writes: On Mon, Nov 20, 2000 at 05:05:39PM +, Walter C. Pelissero wrote: I'm trying to run a SCO SVR4 executable on FreeBSD but I get a SIGSYS (invalid system call) at the very beginning. Here is the kdump: Which call is it about? I see an "old.lstat" but I

Semaphore blocking and signal handling

2000-11-21 Thread Vladimir Terziev
Hi. Am I right for the following: When a process is blocked on semop (trying to get resource) and receives a signal (for which the process has a handler), the process gets unblocked from the semop wait (to handle the signal), and after handling the signal continues with the instruction after

Hiding the cursor on the console

2000-11-21 Thread andrew
Hi, Is it possible to hide the (text) cursor when using syscons? There is no vi attribute defined for the cons25 termcap record...is this an oversite or is it not possible? Thanks, Andrew To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the

RE: Semaphore blocking and signal handling

2000-11-21 Thread Dmitry Dicky
Hi, easy: --- extern int errno; int sem_lock(int semnumb) { struct sembuf sb[2]; sb[0].sem_num = semnumb; sb[0].sem_op = -1; sb[0].sem_flg = 0; again: if( semop(sh-sem, sb,1) ) { errmsg("Semaphore %d erorr: %s\n",sh-sem, strerror(errno));

Re: res_ functions thread safe?

2000-11-21 Thread Jacques A. Vidrine
On Tue, Nov 21, 2000 at 01:31:06PM +0600, Max Khon wrote: if I understand correctly nsswitch patches implement getxxx_r functions as well Yes, but they have to live `on top of' the existing resolver. :-( -- Jacques Vidrine / [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED] To

Systems programming questions...

2000-11-21 Thread Mark
Hey all -- I'm trying to find a "correct" way to add virtual interfaces to my network card via a C program. right now, I've come up with 3 system() calls to do the work. I don't know if there is a better way or not, but if there is, I'd like to use it. Is there a better way to create and make

Re: Systems programming questions...

2000-11-21 Thread Peter Pentchev
On Tue, Nov 21, 2000 at 09:29:02AM -0600, Mark wrote: Hey all -- I'm trying to find a "correct" way to add virtual interfaces to my network card via a C program. right now, I've come up with 3 system() calls to do the work. I don't know if there is a better way or not, but if there is,

Re: SVR4 missing syscall

2000-11-21 Thread Dan Nelson
Followups to -emulation, please In the last episode (Nov 21), Walter C. Pelissero said: Dan Nelson writes: In the last episode (Nov 20), Walter C. Pelissero said: I'm trying to run a SCO SVR4 executable on FreeBSD but I get a SIGSYS (invalid system call) at the very beginning. Here is

Re: Systems programming questions...

2000-11-21 Thread Mark
Thus spake Peter Pentchev ([EMAIL PROTECTED]): On Tue, Nov 21, 2000 at 09:29:02AM -0600, Mark wrote: Hey all -- I'm trying to find a "correct" way to add virtual interfaces to my network card via a C program. right now, I've come up with 3 system() calls to do the work. I don't

Re: Hiding the cursor on the console

2000-11-21 Thread Dan Nelson
In the last episode (Nov 21), [EMAIL PROTECTED] said: Hi, Is it possible to hide the (text) cursor when using syscons? There is no vi attribute defined for the cons25 termcap record...is this an oversite or is it not possible? You can cheat by setting the cursor shape to an invalid one,

Re: Hiding the cursor on the console

2000-11-21 Thread Peter Pentchev
On Tue, Nov 21, 2000 at 10:05:33AM -0600, Dan Nelson wrote: In the last episode (Nov 21), [EMAIL PROTECTED] said: Hi, Is it possible to hide the (text) cursor when using syscons? There is no vi attribute defined for the cons25 termcap record...is this an oversite or is it not

Re: React to ICMP administratively prohibited ? - commit candidate ?

2000-11-21 Thread Jesper Skriver
On Fri, Nov 17, 2000 at 09:10:13PM +0100, Jesper Skriver wrote: As said before, I've not got this code working, when the sysctl 'net.inet.tcp.icmp_admin_prohib_like_rst' is set to 1, we'll treat a ICMP administratively prohibited (icmp type 3 code 9, 10 and 13) as if we recived a TCP RST, but

sfork() ??

2000-11-21 Thread Pedro F. Giffuni
Hi, I was reading that interesting article that some posted on the list of an implementaion of Scheduler Activations for an old version of BSDI. The article mentions that it was based of BSDI's sfork() call. This call is referenced in our syscalls.master but it's not implemented and the BSDI

Re: fclose vs ferror (from libc/getcap)

2000-11-21 Thread Garance A Drosihn
At 12:19 PM +0200 11/20/00, Robert Nordier wrote: Garance A Drosihn wrote: [...] The basic problem is some code which does: (void)fclose(pfp); if (ferror(pfp)) { ...do stuff... } I find it surprising that the above works under FreeBSD. [...] Bear

Re: sfork() ??

2000-11-21 Thread Tony Finch
"Pedro F. Giffuni" [EMAIL PROTECTED] wrote: Can someone knowledgeable comment on what it does, and maybe if it could (or should) be brought into FreeBSD ? Perhaps you are looking for rfork()? AFAIK Irix calls rfork() sfork(). Tony. -- f.a.n.finch [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: sfork() ??

2000-11-21 Thread Pedro F Giffuni
It might be.. rfork comes from plan 9 and along with sfork it wasn't part of the 4.4BSDlite 2 release, OTOH if both are the same, why aren't we referencing it in our syscalls for compatibility with BSDI ? I can't find a reference to sfork elsewhere, but anyone with BSD/OS 2.x or later should

Re: truss -f

2000-11-21 Thread Sergey Babkin
Roman Shterenzon wrote: Hi, Once, someone told me that he had a patch for truss that allows it to follow children, just like in Solaris (or strace -f in linux). Does anyone have it? Why don't you use the native ktrace/kdump commands instead ? "ktrace -d" does follow the children. I

Interrupt threads

2000-11-21 Thread Drew Eckhardt
For reasons beyond my control, I'm stuck using FreeBSD in a real time system and am violating my timing constraints when too many SCSI commands complete in a short time frame and starve one of my userland real time processes. If the interrupt handler wokeup a kernel thread running at a lower

SIGPIPE in multithread http server.

2000-11-21 Thread Nicolai Petri
I hope someone can help me with this issue.. When the application recieves a SIGPIPE the thread hangs hard.. What is the correct thing to do when a socket is closed by the remote end ?? The fault happens each time I'll hit reload in my browser while there's still a connection open (while

Re: SIGPIPE in multithread http server.

2000-11-21 Thread jl
You should have the thread call signal() to ignor the sigpipe signal so the thread won't hang. == WWW.XGFORCE.COM The Next Generation Load Balance and Fail Safe Server Clustering Software for the Internet. == -

Re: SIGPIPE in multithread http server.

2000-11-21 Thread Alex Belits
On Wed, 22 Nov 2000, Nicolai Petri wrote: I hope someone can help me with this issue.. When the application recieves a SIGPIPE the thread hangs hard.. What is the correct thing to do when a socket is closed by the remote end ?? When application receives SIGPIPE the correct thing to do is

Re: UDP limits in dns server?

2000-11-21 Thread Kurt J. Lidl
On Tue, Nov 21, 2000 at 05:54:06AM +, Tony Finch wrote: I'm looking up the IP addresses with up to 1500 or so processes each taking a list of addresses and running gethostbyaddr() on them. That's stupid. Use adns instead. http://www.chiark.greenend.org.uk/~ian/adns/ That's stupid, use

Re: sfork() ??

2000-11-21 Thread Kurt J. Lidl
On Tue, Nov 21, 2000 at 08:27:06PM -0500, Pedro F Giffuni wrote: rfork comes from plan 9 and along with sfork it wasn't part of the 4.4BSDlite 2 release, OTOH if both are the same, why aren't we referencing it in our syscalls for compatibility with BSDI ? I can't find a reference to sfork

Re: fclose vs ferror (from libc/getcap)

2000-11-21 Thread Daniel C. Sobral
Garance A Drosihn wrote: The "single Unix spec" says: After the call to fclose(), any use of stream causes undefined behavior. FreeBSD's own man page for fclose says: [fclose returns 0 or EOF]. In either case, no further access to the stream is possible.

Re: find, -delete, and relative paths

2000-11-21 Thread Cyrille Lefevre
"Daniel O'Connor" [EMAIL PROTECTED] writes: On 20-Nov-00 Brian Reichert wrote: I didn't find anything after an admittedly quick look intp PRs and the mail list archives: Under FreeBSD 3.4-RELEASE, we are running a simple log file scrubber: 15 3 * * * find

Re: fclose vs ferror (from libc/getcap)

2000-11-21 Thread Garance A Drosihn
At 2:11 PM +0900 11/22/00, Daniel C. Sobral wrote: Garance A Drosihn wrote: The "single Unix spec" says: After the call to fclose(), any use of stream causes undefined behavior. FreeBSD's own man page for fclose says: [fclose returns 0 or EOF]. In either case, no

Re: fclose vs ferror (from libc/getcap)

2000-11-21 Thread Daniel C. Sobral
Garance A Drosihn wrote: Undefined behavior means anything goes. On a standard, it means the behaviour is implementation-defined (which may be undefined or not). But if "anything goes", then that you can not expect it to work; certainly not when porting to other platforms. Sure enough.