Michael Barnes wrote: > > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] >> >> Michael Barnes wrote: >>> >>> My apologies. I know this is a cross-platform group, and that is >>> fine. However, if you are unable to understand simple Linux >>> terminology, then it is doubtful that you can help answer my question. >>> If the description is nonsense to you, then please don't waste your >>> or my time in an apparent slam on my choice of operating systems. If >>> your reply represents the general attitude of this list, then it looks >>> like I've come to the wrong place for assistance. >>> >>> But, to simplify my request, a pid is a process id. In Linux, the command >>> 'ps' will give a listing of process IDs. >>> I need the script to determine its own pid, then write that to a file. >> >> I find THIS email pretty rude. >> >> There is nothing inherently Unix specific about finding the process >> id, writing it into a file (in whatever format) and possibly deleting >> it when the script exits. If you said what you wanted to acomplish, >> you'd get a help much sooner. And where did you find any slam of your >> OS choice is beyond me. >> >> If this is your general attitude in mailing lists I would not be >> surprised if you had to change lists quite often. > > Interesting. I post a question looking for assistance. I am > promptly chastised for my terminology, then told what I am trying to > do is nonsense, and I'M the rude one? > > Well, let's see. In my original post, I said "I need to have my > script create a pidfile." and "I need my script to create a pidfile > when it starts." That is what I need to accomplish. I thought it was > pretty clear.
There is a long-standing philosophy in Perl culture that it should be as platform-independent as possible. A lot of hard work has gone into making things like multithreading work the same way everywhere, and such things as file path separators are consistent and independent. However some platform-specific features are inevitable, for instance if I need Perl to manipulate the Windows registry then I have no choice but to say so. It seems that all you required was for a Perl process to write its process ID into a file. That is not a concept unique to Unix, and had you explained things in that way you would have had a lot more group members on side and willing to help. > Instead of assistance, I'm told "your post is heavy with Unix > terminology." I guess that the terms "pid" "pidfile" and "ps" are > only used by very deeply experienced Unix programmers. But, Jenda > says "There is nothing inherently Unix specific about finding the > process id, writing it into a file", so it is unclear whether the > terms "pid" "pidfile" are "heavy Unix terminology" or not. I didn't say that you were using heavy Unix terminology, I said that your post was heavy with such language. PID, pidfile and ps are Unix jargon for simple concepts - they are just not called that (with the exception of PID) outside Unix-like environments. > As far as "where did you find any slam of your OS choice is beyond > me", apparently you didn't read the posts very well. First he says > "your post is heavy with Unix terminology.", which tells me he > believes I am using Unix (actually, I use Linux), then he says > "'comparing the pid in the pidfile with ps' is nonsense." So, I > guess if he doesn't understand it, it is nonsense. If you felt I was slamming your OS then your were being over-sensitive. You still haven't explained where you found such an intention implied in my post, and I can assure you that I didn't intend one. The terms you used, I'm sure you'll agree, are common to most if not all Unix-like systems. So while you may be using Linux I think it it is fair to say that you were using Unix terminology in your post, as I was referring to your language rather your installed software. When I said that 'It does it by comparing the pid in the pidfile with ps' was nonsense, I didn't mean that I couldn't understand your words. While I spend more time programming Windows systems than Unix ones I still have a good understanding of both. I meant that it was, simply, nonsense. All I can think that that piece of English could mean is either - Compare the PID to the ps utility or - Compare the PID (to something) using the ps utility both of which are, as I said, nonsense. What you actually wanted was to see if the process with the PID in the file was still running, and you should have said so. > If I saw a request for help that was obviously involving a > programming language or OS I did not understand, I would simply > ignore it and move on. I certainly would not chastise the originator > for using terms I personally do not understand, and I definitely > would not refer to functions as nonsense just be cause I don't happen > to be familiar with them. I have already explained that you will get better help on this, and indeed any group if you alienate as few members as possible. But it is also poor programming practice to involve parts of an imagined solution in your statement of a problem, as if you do you are immediately and unintentionally restricting possible solutions. You didn't say whether or not the process that was doing the monitoring was written in Perl. (If you still have a choice, I would recommend that it should be, unless it actually has to do a lot more than the monitoring you describe.) But shelling out to the ps utility is a very awkward way of checking whether a process is still running, and you could usefully investigate the Perl kill() function as an alternative technique. > I don't change lists very often. I am a member of quite a few > mailing lists. But I have never been treated like this on any list > before. I guess my original assumption was right, "This may be a bit > advanced for a beginner's group." Your problem is trivial compared to many that are posed here. I am sorry that you were upset by my reply, but I had no intention of being offensive and I would suggest that you misinterpreted what I wrote. You are certainly over-sensitive about being criticized for your choice of platform, as it is hard to read that into my words. If you choose to stay then we will to our best to help, but I hope your will bear in mind at least the spirit of what I have written here. If you go elsewhere for assistance then I wish you well. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/