Berkeley CSUA MOTD:Entry 22146
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/08 [General] UID:1000 Activity:popular
7/8     

2001/8/17-19 [Computer/HW, Computer/SW/Unix] UID:22146 Activity:high
8/16    I'm writing the tcp server and for simplicity I've chosen to
        write it as a concurrent server (call fork() for each client).
        I'd like to limit the max number of concurrent instances of my
        server that can run. I tried looking in Stevens Unix Network
        Programming, but this doesn't seem to be covered. Any ideas? TIA.
        \_ you know, you can't expect the answer to every fucking dumb
           question answered in a book. at some point, the book has to
           assume you have a brain. why don't you just fucking keep
           track of the count of children in the listening process?
           \_ Well, you have to decrement the count in the SIGCHLD
              handler and there is a small possibility that you might
              miss a signal while you are in the handler. I need something
              reliable.
              \_ A reasonable objection, but if this is really an issue,
                 you can store a list of all children, and poll all of them
                 once every {minute,hour,day,week,???} to see if they're
                 all still alive. This is admittedly a hack though. -alexf
                 \_ This is what it looks like I'm going to have to do.
                    Thanks.
              \_ um. no.
                 \_ Not all platforms support reliable signal
                    delivery. One of the systems I need to support
                    does not reliably queue signals.
                    \_ man wait[pid|3|4] this should be reliable, but of
                       course none of us can really help if we don't
                       know anything about the platforms you are using.
        \_ Looking at http://cr.yp.to/ucspi-tcp/tcpserver.html might help.
           It's fairly portable afaik, but djb's coding style is crazy.
                                                     -- misha.
           -c option does what you want.  -- misha.
ERROR, url_link recursive (eces.Colorado.EDU/secure/mindterm2) 2025/07/08 [General] UID:1000 Activity:popular
7/8     

You may also be interested in these entries...
2012/8/29-11/7 [Computer/SW/Security] UID:54467 Activity:nil
8/29    There was once a CSUA web page which runs an SSH client for logging
        on to soda.  Does that page still exist?  Can someone remind me of the
        URL please?  Thx.
        \_ what do you mean? instruction on how to ssh into soda?
           \_ No I think he means the ssh applet, which, iirc, was an applet
              that implemented an ssh v1 client.  I think this page went away
	...
2012/3/15-6/1 [Computer/SW/Languages, Computer/SW/OS/Windows] UID:54340 Activity:nil
3/15    Why does MS put double-quotes around the '8' in Windows Server 8, like
        the following?
        - Windows 8
        - Windows Server "8"
        \_ Because when they didn't do it, code didn't see the '\0'
           and went over?  Looks better than '8','\0' *shrug*
	...
2012/1/4-2/6 [Computer/HW/Drives] UID:54281 Activity:nil
1/4     I want to test how my servers behave during a disk failure and
        a RAID reconstruction so I want to simulate a hardware failure.
        How can I do this in Linux without having to physically pull
        a drive? These disks are behind a RAID card and run Linux. -ausman
        \_ According to the Linux RAID wiki, you might be able to use mdadm
           to do this with something like the following:
	...
2011/11/16-12/28 [Academia/Berkeley/CSUA, Computer/HW] UID:54230 Activity:nil
11/16   We'll be taking all CSUA machines offline in the near future for a Soda
        Hall server room reorganization (we're being moved to a neighboring
        server cabinet).  Downtime will hopefully be minimal.  --jordan
        \_ Thanks for all your work keeping the machines running!  It's
           been awesome having soda actually working again.
        \_ Update:  this is tentatively scheduled for Saturday afternoon.
	...
2011/9/14-10/25 [Computer/HW/Drives] UID:54173 Activity:nil
9/13    Thanks to Jordan, our disk server is no longer virtualized. Our long
        nightmare of poor IO performance should hopefully be over. Prepare for
        another long nightmare of poor hardware reliability!
        ...
        Just kidding! (I hope)
        In any case, this means that cooler was taken out back and shot, and
	...
2011/8/19-27 [Computer/Companies/Google] UID:54169 Activity:nil
8/19    Is there such a thing as a IMAP->POP proxy? I want to use Gmail on
        a server that only supports IMAP, and Gmail only connects to POP.
	...
2012/3/29-6/4 [Computer/HW/Memory, Computer/HW/CPU, Computer/HW/Drives] UID:54351 Activity:nil
3/29    A friend wants a PC (no mac). She doesn't want Dell. Is there a
        good place that can custom build for you (SSD, large RAM, cheap video
        card--no game)?
        \_ As a side note: back in my Cal days more than two decades ago when
           having a 387SX made me the only person with floating-point hardware,
           most machines were custom built.
	...
2012/1/27-3/26 [Computer/SW/Unix] UID:54299 Activity:nil
1/27    Interesting list of useful unix tools. Shout out to
        cowsay even!
        http://www.stumbleupon.com/su/3428AB/kkovacs.eu/cool-but-obscure-unix-tools
        \_ This is nice.  Thanks.
	...
2011/10/26-12/6 [Computer/SW/Unix] UID:54202 Activity:nil
10/24  What's an easy way to see if say column 3 of a file matches a list of
       expressions in a file? Basically I want to combine "grep -f <file>"
       to store the patterns and awk's $3 ~ /(AAA|BBB|CCC)/ ... I realize
       I can do this with "egrep -f " and use regexp instead of strings, but
       was wondering if there was some magic way to do this.
       \_ UNIX has no magic. Make a shell script to produce the ask or egrep
	...
2010/3/10-30 [Computer/SW/Mail] UID:53751 Activity:nil
3/10    What email program do people in Cal CS use nowadays?  In my school days
        people used /usr/bin/mail, then RMail in emacs, then VMail in emacs.
        After my days people used Elm, Pine, Mutt (I forgot which order).  In
        my first two jobs we could tell the seniority of fellow engineers based
        on which email program they use at work, because everyone used what
        they used to use in their school years.  In my last two jobs though,
	...
2009/11/13-30 [Computer/SW/Unix] UID:53523 Activity:nil
11/12   How does one find out if a system has rootkit installed?
        \_ Unix or m$?
           \_ Unix. On M$ I always assume it's compromised.
              \_ Install Tripwire before you plug your server into The Net?
                 The only other answer I can think of is to reinstall the
                 OS from scratch on another server and do an md checksum
	...
2009/9/4-12 [Computer/SW/OS/FreeBSD] UID:53331 Activity:kinda low
9/4     I'm seriously very happy Soda no longer runs FreeBSD.
        FreeBSD is really going down the tubes
        http://freebsdgirl.com/2009/08/its-a-dirty-job-but-someone-ha.html
        \_ funny, I dont remember it geting pwned anywhere near as many tmies
           as it has since the switch to Linux.  And that blog post is
           only abou the installer, not the running OS
	...
2009/7/24-29 [Computer/SW/Editors/Vi] UID:53195 Activity:low
7/24    Is dos2unix available somewhere?  Someone added all those Ctrl-M's to
        motd.public.
        \_ %s/^V^M//g in vim. What has your editor done for you today?
           \_ that works great in vi actually... in vim :set filetype=unix
	...
Cache (767 bytes)
cr.yp.to/ucspi-tcp/tcpserver.html
On systems supporting SYN cookies, the backlog is irrelevant. If the client is sending packets along an IP source route, send packets back along the same route. A client can still use source routing to connect and to send data, but packets will be sent back along the default route. This is currently the default, but it may not be in the future; To avoid loops, you must use this option for servers on TCP port 53. After looking up the remote host name in DNS, look up the IP addresses in DNS for that host name, and remove the environment variable $TCPREMOTEHOST if none of the addresses match the client's IP address. To avoid loops, you must use this option for servers on TCP port 53. To avoid loops, you must use this option for servers on TCP ports 53 and 113.