revjim.net

August 17th, 2003:

oh yeah…

I’m not sure who dropped the ball on this one, but I’m not very happy about it. I altered the nameserver records of one of my other domains, inkshop.org, through OpenSRS (read: Tucows). I wanted to set the name server to be “ns1.inklog.net”, but for some reason, it kept telling me I couldn’t, even though I had other domains using that nameserver. So, I said fuck it, and made a record named “ns1.inkshop.org” that pointed to the same IP as “ns1.inklog.net” and added that as my nameserver in WHOIS. Well, that night, the hostmaster databases were updated, and apparently I have no nameserver record at all. YAY! So, inkshop.org is unroutable, currently. I don’t know who to contact. OpenSRS wants me to go through my reseller. But… my reseller (thenic.com) is pretty small. I don’t even know if they know how to handle this kind of thing. It doesn’t take much to be an OpenSRS reseller (knowledge-wise) so, it’s hard to know how much ability they have. Hopefully, at the very least, they’ll be able to put in a support request with OpenSRS to get it fixed. I also sent a request to OpenSRS themselves… but I’m pretty sure they are going to tell me to contact my reseller.

getting there

The daemon processing framework is written. I can accept requests on any port using XML-RPC. The daemon supports a very small subset of HTTP… just enough to get by. It knows how to ignore the first line of the request, parse the headers and look for Content-Length and then get the content. I haven’t decided what is better: grab only Content-Length bytes, grab all the bytes and ignore Content-Length, or yell and scream if they differ from one another.

Next step, write functions that do all the odd little jobs and connect them via XML-RPC. Ugh. I hate coding.

I cleaned the kitchen, again. How many times can a person clean the kitchen in one day? I also put in a load of laundry. Now I’m going to go check the mail. Jess gets an incredibly large amount of mail every day (… don’t ask …) so if we don’t check it every day, it gets too full to get more mail. Jess usually takes care of it. I checked it on Wednesday, the day she left. I haven’t done it since. Ooops. Don’t tell, okay?

After that I’m getting out of the house. I haven’t left all day. I’ve just stared at this screen, or the one in the living room, hoping the motivation to churn out a few lines of code would hit me. It never did. I’m not sure where I’m going. It’s too hot to get out of the car for more than 30 seconds… so… maybe I’ll just drive a lot.

socket code and process control

I guess the problem is in PHP. When PHP is waiting for a new socket connection, it can’t do anything else, even if signal handlers have been set up. So, for now, I’m just going to rely on INETD to handle that part. In otherwords, the process will not fork. Each time it is spawned, it will expect to handle one connection, perform it’s duties, and exit. This means I don’t need socket functions or process control since inetd will give me the data on stdin and send the data found on stdout. Additionally, since it’ll spawn a new process for every incoming connection, I don’t need process control.

If anyone can supply me with a piece of PHP code that can spawn a child process, and allow that child to exit while waiting on something else, please let me know. The only way I can think to force it to work, would be to set a timeout on the socket_accept routine. If after a second or two, the process has not found a new connection, it should loop. This would give it time to close child processes and then get back to looking for a connection to accept.

forking question

If I fork a child process, and the child exits, how can I get the parent to wake up and see that? What happens is that, since the parent is doing something else (specifically, waiting for a new socket connection), it won’t acknowledge that exit until it’s done doing what it’s doing (which means, until another connection comes in).

Push To Talk

Verzion Wireless will be offering PUSH TO TALK (like Nextel’s Direct Connect) service starting this Monday (2003-08-18). The downside is, the plans are $20 more per month. Additionally, I don’t know if shared lines will get to use PTT or not. Finally, they only have one phone that supports it, and that phone runs $149.99 with a two-year contract.

Still PTT is so wonderful to have. And, like Nextel’s new offering, it’s nationwide.