Linux-Development-Apps Digest #766, Volume #6 Thu, 13 Jul 00 23:13:16 EDT Contents: Re: alternative to "sleep" (David T. Blake) How to rescan scsi devices ? ("Sergey Vichik") threads (Sukru Cinar) Re: How to rescan scsi devices ? (Tom McGivern) Re: alternative to "sleep" (Wolfgang Denk) Breakpoints in dlopen'ed objects (Bruce Forsberg) Re: How to rescan scsi devices ? (Paul Seelig) Re: Steganographic encryption system (phil hunt) Re: Breakpoints in dlopen'ed objects (John Reiser) Re: Microsoft's new ".NET" (Walter Rawdanik) Re: Graphical C++ in linux. (Walter Rawdanik) Re: Are there good C++ and Jave development environments under linux ? (Walter Rawdanik) Re: Where is <limits>? ("Christopher Prosser") Re: How to write a "Notice Program" (William Shotts) Re: Help (cLIeNUX user) Re: Steganographic encryption system (phil hunt) Re: Steganographic encryption system (phil hunt) Re: Steganographic encryption system (phil hunt) Re: Where is <limits>? (cLIeNUX user) What's the "opposite" of brk() ? (cLIeNUX user) ---------------------------------------------------------------------------- From: [EMAIL PROTECTED] (David T. Blake) Subject: Re: alternative to "sleep" Date: 13 Jul 2000 17:36:22 GMT Reply-To: [EMAIL PROTECTED] Konstantin Schauwecker <[EMAIL PROTECTED]> wrote: > Hi! I'm develloping a c++ CGI. The program is running a long > time in a loop and I don't want to use much CPU speed. In perl I > solved the problem by calling Sleep(0.1) every loop. In c there > is also a command called sleep but I can only sleep for whole > seconds and that's too slow. Does anybody know a solution? Use select with a timeout. -- Dave Blake [EMAIL PROTECTED] ------------------------------ From: "Sergey Vichik" <[EMAIL PROTECTED]> Crossposted-To: comp.os.linux,comp.os.linux.admin,thenet.support.linux Subject: How to rescan scsi devices ? Date: Thu, 13 Jul 2000 20:31:43 +0200 Hello, if anybody knows how to rescan devices on FC, or how to detect new devices, please let me know. I need to detect new devices when added without removing the HBA driver. Thank you. Sergey Vichik. ------------------------------ From: Sukru Cinar <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Subject: threads Date: Thu, 13 Jul 2000 17:01:16 -0400 is there any way I can detect how threads are scheduled during execution of a program? (without kernel help) is it possible to enforce a thread to start execution at a given point when it is scheduled next time or is it possible to send a signal to a thread just at the point it is stopped for rescheduling? thanks. ------------------------------ From: Tom McGivern <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Crossposted-To: comp.os.linux,comp.os.linux.admin,thenet.support.linux Subject: Re: How to rescan scsi devices ? Date: Thu, 13 Jul 2000 21:14:13 GMT won't an ioscan do this? (ioscan -fnC disk) Sergey Vichik wrote: > Hello, > if anybody knows how to rescan devices on FC, or how to detect new devices, > please let me know. > > I need to detect new devices when added without removing the HBA driver. > > Thank you. > > Sergey Vichik. ------------------------------ From: Wolfgang Denk <[EMAIL PROTECTED]> Subject: Re: alternative to "sleep" Date: Thu, 13 Jul 2000 19:35:01 GMT Konstantin Schauwecker <[EMAIL PROTECTED]> writes: >I'm develloping a c++ CGI. The program is running a long time in a loop >and I don't want to use much CPU speed. In perl I solved the problem by >calling Sleep(0.1) every loop. In c there is also a command called sleep >but I can only sleep for whole seconds and that's too slow. Does anybody >know a solution? Don't just run in a loop, block and wait for events instead. BTW: you can combine both (waiting for events and sub-second sleeps) wit the same call: man select. Also, sub-second sleeps is a FAQ, please check there. Wolfgang -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Web: www.denx.de I am a computer. I am dumber than any human and smarter than any ad- ministrator. ------------------------------ From: Bruce Forsberg <[EMAIL PROTECTED]> Subject: Breakpoints in dlopen'ed objects Date: Thu, 13 Jul 2000 21:18:15 GMT I am developing an Open Source C++ library that makes heavy use of dlopen'ed shared objects. I use g++ and ddd to debug. When I am running and set breakpoints in a dlopen'ed shared object after it has been openned all is fine. If I try to rerun the application. I get the error that a breakpoint specifies an illegal address, obviously because the shared object is no longer open and is not mapped yet. I have to delete all my breakpoints in dlopen'ed modules when I rerun and set them again once I dlopen the object. Is there any way to configure gdb or ddd to fix this. I don't need a work around, I have plenty of those. The work arounds are OK just time consuming. I guess the ultimate work around is not to make programming errors in the first place. There are three chances of that ever happening to me: slim, fat, and none. Thanks, Bruce Forsberg Sent via Deja.com http://www.deja.com/ Before you buy. ------------------------------ From: Paul Seelig <[EMAIL PROTECTED]> Crossposted-To: comp.os.linux,comp.os.linux.admin,thenet.support.linux Subject: Re: How to rescan scsi devices ? Date: 13 Jul 2000 23:26:21 +0200 "Sergey Vichik" <[EMAIL PROTECTED]> writes: > if anybody knows how to rescan devices on FC, or how to detect new devices, > please let me know. > ======= /usr/local/sbin/scsi=rescan.sh ====== #!/bin/sh echo "SCSI Bus Rescan..." for i in 0 1 2 3 4 5 6 7; do # Removing all devices: echo "scsi remove-single-device 0 0 $i 0 " >/proc/scsi/scsi; done for i in 0 1 2 3 4 5 6 7; do # Readding of all found devices: echo "scsi add-single-device 0 0 $i 0 " >/proc/scsi/scsi; done ======= /usr/local/sbin/scsi=rescan.sh ====== ------------------------------ From: [EMAIL PROTECTED] (phil hunt) Crossposted-To: sci.crypt,uk.comp.os.linux Subject: Re: Steganographic encryption system Date: Thu, 13 Jul 2000 14:26:58 +0100 Reply-To: [EMAIL PROTECTED] On Wed, 12 Jul 2000 18:43:34 -0400, jungle <[EMAIL PROTECTED]> wrote: >phil hunt wrote: >> >> On Wed, 12 Jul 2000 00:40:39 -0400, jungle <[EMAIL PROTECTED]> wrote: >> >current, well working stego have ration of 1 to 2 ... >> >and all are super safe / super stego ... >> >you are creating stego that will have ratio of 1 to 30 ... >> > >> >what a waste of resources ... >> >> I'm not forcing you to use it, you know. > >I'm not stopping your from developing un - needed software, to ... I'm not stoping yu form riting badlee-spellt and punchtuatid mesajiz, eyethur ... -- ***** Phil Hunt ***** send email to [EMAIL PROTECTED] ***** Moore's Law: hardware speed doubles every 18 months Gates' Law: software speed halves every 18 months ------------------------------ From: John Reiser <[EMAIL PROTECTED]> Subject: Re: Breakpoints in dlopen'ed objects Date: Thu, 13 Jul 2000 14:52:19 -0700 > I have to delete > all my breakpoints in dlopen'ed modules when I rerun and set them again > once I dlopen the object. Is there any way to configure gdb or ddd to > fix this. I don't need a work around, I have plenty of those. The work > arounds are OK just time consuming. The `disable' and `enable' commands of gdb make it easier than `delete' and re-entering. (It's not a complete solution, I know, but might be better than some.) -- ------------------------------ From: Walter Rawdanik <[EMAIL PROTECTED]> Subject: Re: Microsoft's new ".NET" Date: Thu, 13 Jul 2000 16:47:17 -0500 "David T. Blake" wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > P.S. Internet Explorer was originally developed by Spry, Inc. > > > > I don't believe IE was ever developed by Spry. IE is, however, > > based on the browser Spry wrote. Besides, there's nothing wrong > > with seeing good technology and buying it with the intent of > > bringing it to more people. Hell, that's the real reason for MS's > > success: they've had the wisdom (and luck) to see good > > opportunities and take advantage of them when everyone else is > > looking the other way. > > > > Isn't Navigator based on NCSA Mosaic? ISTR seeing the NCSA > > mentioned in the credits somewhere. > > Well, I was wondering where this was going until this lin > of bull came up. > > Spyglass has licensing rights to the NCSA Mosaic code. > > They licensed it, on a percentage royalty basis, to many > companies. They absolutely did not, and have not, sold it > to Microsoft. > > However, Microsoft gave the product away, thus killing the ENTIRE > BUSINESS PLAN of Spyglass. Certainly an element of this is that > Spyglass didn't even conceive of Microsoft giving away a > web browser. After Microsoft gave it away, all other licensing > deals were killed, and Spyglass had to reformulate as a company. > Great, do you have anything against having free nice browser like IE ? Obviously Spyglass folks weren't smart and coutious enough when signing deal with MS. Their fault. ------------------------------ From: Walter Rawdanik <[EMAIL PROTECTED]> Subject: Re: Graphical C++ in linux. Date: Thu, 13 Jul 2000 16:48:32 -0500 http://www.trolltech.com/developer/ Have fun ... Christian Olsson wrote: > [EMAIL PROTECTED] wrote: > > > > Well, for C++ I advise you to choose Qt. It is not as good looking as > > Gtk, but it has been designed for C++ programming, whereas Gtk only has > > C++ wrappers. > > > > I use Qt myself, and it is a very easy to use and convenient toolkit. > > > > However, Qt is great for GUIs, but if you want to do a lot of graphical > > stuff (with images, different color depths, etc.) it is not the best. > > > > Sent via Deja.com http://www.deja.com/ > > Before you buy. > > Where can I fin documentation, tutorials and etc about QT? > > Christian Olsson ------------------------------ From: Walter Rawdanik <[EMAIL PROTECTED]> Subject: Re: Are there good C++ and Jave development environments under linux ? Date: Thu, 13 Jul 2000 16:52:06 -0500 Scott Clough wrote: > If you want a "better" editor (my opinion only) while sticking with gcc > underneath, try CodeWarrior (metrowerks). I have and use SlickEdit which is fine but bit slow as compared to MS VS on the same machine ( 500 MHZ.) Do you know what GUI toolkit CodeWarrior on Linux uses ? Is it Motif or something else ? Thanks Walter ------------------------------ From: "Christopher Prosser" <[EMAIL PROTECTED]> Crossposted-To: gnu.gcc Subject: Re: Where is <limits>? Date: Thu, 13 Jul 2000 16:39:26 -0700 nope. I really am looking for just plain limits. sorry this reference is from ms, but limits provides explicit instantiations of numeric_limits for use in template based numeric programming. http://msdn.microsoft.com/library/devprods/vs6/visualc/vclang/LIMITS2.HTM --chris prosser "Kaz Kylheku" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > On Thu, 13 Jul 2000 14:47:58 -0400, John Gluck <[EMAIL PROTECTED]> > wrote: > >Christopher Prosser wrote: > > > >> Hi Folks, > >> I'm trying to compile some stuff under a standard RedHat 6.2 dist and I > >> can't find <limits>. It doesn't seem to be anywhere on my disk as doing a > >> find and looking in all the usual places doesn't turn it up. There is a > >> check in comment at the gcc/egcs site that states this file was rolled into > >> libstdc++3 and was rolled into gcc 2.80 (something). The 6.2 dist comes with > >> 2.91.66. > >> Any ideas? > >> -chris prosser > > > >I think you are looking for limits.h > > Or perhaps he is just missing the c from the C++ equivalent, <climits> > > -- > #exclude <windows.h> > ------------------------------ From: William Shotts <[EMAIL PROTECTED]> Subject: Re: How to write a "Notice Program" Crossposted-To: linux.redhat.development Reply-To: [EMAIL PROTECTED] Date: Fri, 14 Jul 2000 01:51:38 GMT Well, you could do something like this... # start of script fragment mail $useraltmail << _EOF_ From: $hostname Notice Bot <mail_bot@$hostname> To: $useraltemail Subject: You haven't checked your mail for awhile This is an automated message sent by $domainname at $ipaddress. This message is being sent to you as it concerns your mailbox at 'faricy.net/var/spool/mail/$username'. You have $n message(s) in your mail box. The earliest message in your box is dated '$fdate', and the latest, '$ldate'. Your mail box currently occupies $B byte(s), or ~$KB of space. This is only a notice to remind you about your account at faricy.net or one of its domains, but there is no obligation to do anything about it. Thank you. ================ _EOF_ # end of script fragment Everthing between the _EOF_ tokens is a "here script". Within it you can do all the variable substitution you like. It will be taken as the standard input to the "mail" command. -- ||||| William Shotts, Jr. ([EMAIL PROTECTED]) ||||| http://www.clark.net/pub/bshotts/ (Updated 04/13/2000) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org ------------------------------ From: [EMAIL PROTECTED] (cLIeNUX user) Subject: Re: Help Date: 14 Jul 2000 02:47:13 GMT [EMAIL PROTECTED] >Christopher Plant <[EMAIL PROTECTED]> writes: > >> I'm 16 and have taught myself C to the level of malloc/free linked lists >> fifo ,etc and want help! Can anyone recommend a good book describing >> socket routines and other linux tasks. I'm trying to write a small >> messaging system for my win98/linux network. HELP PLEASE! > >"Unix Network Programming" by W. Richard Stevens is the standard text >for this sort of thing, and is highly recommended by most everyone. >(I don't have a copy myself, but I plan to buy it when the need >arises.) and last I heard the late Mr. Stevens webpage is full of example source. Yahoo for Richard Stevens Rick Hohensee [EMAIL PROTECTED] > >-- > >Nate Eldredge >[EMAIL PROTECTED] ------------------------------ From: [EMAIL PROTECTED] (phil hunt) Crossposted-To: sci.crypt,uk.comp.os.linux Subject: Re: Steganographic encryption system Date: Thu, 13 Jul 2000 22:55:28 +0100 Reply-To: [EMAIL PROTECTED] On 12 Jul 2000 14:54:36 GMT, Paul Hughett <[EMAIL PROTECTED]> wrote: >In comp.os.linux.development.apps phil hunt <[EMAIL PROTECTED]> wrote: > >:>Explaining quite why a 1k plaintext encrypts to a 30k cyphertext >:>might keep you busy. > >: Not at all. If you try to encrypt a 1K file, the system will *always* >: produce a ciphertext which is substantially larger. This has the advantage >: of helping to defeat traffic analysis attacks. > >: Since stes will be open source, it probably won't be too difficult to prove >: to a court that this is the case. > >The hard part comes when to try to prove to a court that the 1k plaintext >is the *only* message stored in this 30k ciphertext. This will depend on the jurisdiction you live in. If a court will imprison you for failing to prove something that is impossible to prove, then you are not living somewhere under the rule of law, so stes cannot help you. -- ***** Phil Hunt ***** send email to [EMAIL PROTECTED] ***** Moore's Law: hardware speed doubles every 18 months Gates' Law: software speed halves every 18 months ------------------------------ From: [EMAIL PROTECTED] (phil hunt) Crossposted-To: sci.crypt,uk.comp.os.linux Subject: Re: Steganographic encryption system Date: Thu, 13 Jul 2000 22:58:06 +0100 Reply-To: [EMAIL PROTECTED] On Thu, 13 Jul 2000 02:17:07 +0100, Michael Rozdoba <[EMAIL PROTECTED]> wrote: > >The kind of security I was after is two fold. First, after the data has >been decrypted, used & discarded, there should be no possibility of >decrypted data being recovered from harddisc, either from deleted >temporary files or swap. Second, if possible, that the state of the system >at all times should be such that if the power is cut, all sensitive data >is lost (once the contents of memory have become irretrievable). > >Are your aims likely to meet these requirements? Yes. (The initial release of stes won't; it'll basically be a technology demonstrator. But later releases can incorporate whole filesystems) >> >Can a program, that doesn't know it's handling sensitive data, be >> >wrapped up in such a way that it is protected from doing anything >> >undesirable with that data? A naive approach would be a mechanism to >> >only permit it access to files in memory, but that could require huge >> >amounts of memory. > >> Modern PCs have 64-128M of memory, which is plenty for many applications. > >For many, yes - but for some applications data of the order of GBs is >involved. Incidentally, any idea what speed will be like, very roughly? It'll run at the speed blowfish decodes in, plus however long it takes to read the file off your hard drive, plus whatever inefficiencies I've added due to my bad programming. -- ***** Phil Hunt ***** send email to [EMAIL PROTECTED] ***** Moore's Law: hardware speed doubles every 18 months Gates' Law: software speed halves every 18 months ------------------------------ From: [EMAIL PROTECTED] (phil hunt) Crossposted-To: sci.crypt,uk.comp.os.linux Subject: Re: Steganographic encryption system Date: Thu, 13 Jul 2000 23:01:42 +0100 Reply-To: [EMAIL PROTECTED] On Thu, 13 Jul 2000 10:23:51 +0100, Andrew McDonald <[EMAIL PROTECTED]> wrote: >On Wed, 12 Jul 2000 02:12:52 +0100, >phil hunt <[EMAIL PROTECTED]> wrote: >> On Tue, 11 Jul 2000, Frank Gifford wrote: >> > >> > There are certain pitfalls with ciphers in this context. Assuming you use >> > a block cipher, you have to consider the chaining mode. >> >> What's a chaining mode? > >Ah. Methinks you need to read up on using crypto. There's nothing like implementing a system for learning about the tech involved! I've now switched over to a version of the blowfish algorithm that uses chaining mode. >Initial/Initialisation vector. Each Data Item (a Data Item is part or all of a file being encrypted) will use a different IV. >> Blowfish is a max of 448 bits, right? > >Just remember that keyspace on its own is not a measure of security. >Consider how many keys a simple substitution cipher has, but it is >not generally secure. Yeah, but blowfish is secure against the sort of simplistic tricks that would work against a substitution cipher, right? -- ***** Phil Hunt ***** send email to [EMAIL PROTECTED] ***** Moore's Law: hardware speed doubles every 18 months Gates' Law: software speed halves every 18 months ------------------------------ From: [EMAIL PROTECTED] (cLIeNUX user) Crossposted-To: gnu.gcc Subject: Re: Where is <limits>? Date: 14 Jul 2000 02:51:54 GMT [EMAIL PROTECTED] >nope. I really am looking for just plain limits. sorry this reference is >from ms, but limits provides explicit instantiations of numeric_limits for >use in template based numeric programming. > >http://msdn.microsoft.com/library/devprods/vs6/visualc/vclang/LIMITS2.HTM > >--chris prosser > >"Kaz Kylheku" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED]... >> On Thu, 13 Jul 2000 14:47:58 -0400, John Gluck <[EMAIL PROTECTED]> >> wrote: >> >Christopher Prosser wrote: >> > >> >> Hi Folks, >> >> I'm trying to compile some stuff under a standard RedHat 6.2 dist and >I >> >> can't find <limits>. It doesn't seem to be anywhere on my disk as doing >a >> >> find and looking in all the usual places doesn't turn it up. There is a >> >> check in comment at the gcc/egcs site that states this file was rolled >into >> >> libstdc++3 and was rolled into gcc 2.80 (something). The 6.2 dist comes >with >> >> 2.91.66. >> >> Any ideas? >> >> -chris prosser >> > >> >I think you are looking for limits.h >> >> Or perhaps he is just missing the c from the C++ equivalent, <climits> >> >> -- >> #exclude <windows.h> >> > > You mean stuff like this in Linux/GNU libc5 limits.h? /* Minimum and maximum values a `signed short int' can hold. */ #define SHRT_MIN (-32768) #define SHRT_MAX 32767 /* Maximum value an `unsigned short int' can hold. (Minimum is 0.) */ #define USHRT_MAX 65535 /* Minimum and maximum values a `signed int' can hold. */ #define INT_MIN (- INT_MAX - 1) #define INT_MAX 2147483647 Rick Hohensee [EMAIL PROTECTED] ------------------------------ From: [EMAIL PROTECTED] (cLIeNUX user) Subject: What's the "opposite" of brk() ? Date: 14 Jul 2000 02:55:58 GMT Reply-To: [EMAIL PROTECTED] How do you find out how big your process currently is? In other words, how do you get the info you need to intelligently use brk() ? Rick Hohensee [EMAIL PROTECTED] ------------------------------ ** FOR YOUR REFERENCE ** The service address, to which questions about the list itself and requests to be added to or deleted from it should be directed, is: Internet: [EMAIL PROTECTED] You can send mail to the entire list (and comp.os.linux.development.apps) via: Internet: [EMAIL PROTECTED] Linux may be obtained via one of these FTP sites: ftp.funet.fi pub/Linux tsx-11.mit.edu pub/linux sunsite.unc.edu pub/Linux End of Linux-Development-Apps Digest ******************************