Linux-Development-Sys Digest #154, Volume #8     Mon, 18 Sep 00 10:13:15 EDT

Contents:
  Re: Is it possible to invoke shell command using java application in linux? 
("Patrick Shomo")
  Re: new windowing system (Christopher Browne)
  Re: new windowing system (Alexander Viro)
  Re: large file support (Andreas Jaeger)
  loading a .so file within a stream? (David T. Grove)
  Re: RPM and Tarball Packages Dilema in Red Hat 6.2 ("Quiney, Philip 
[HAL02:HH00:EXCH]")
  Re: two drivers of same device (Josef Moellers)
  Re: I Need A Shell Script, Or A C Program.... (Josef Moellers)
  kernel update problem ("Meree Tencg")
  Problems with ippp0 ("Diego")
  Finding bottlenecks in my app ([EMAIL PROTECTED])
  how pci devices use dma ("Anil Prasad")

----------------------------------------------------------------------------

From: "Patrick Shomo" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.lang.java,comp.lang.java.gui,comp.lang.java.help,comp.lang.java.programmer,comp.os.linux.development.apps,comp.unix.programmer,linux.redhat
Subject: Re: Is it possible to invoke shell command using java application in linux?
Date: Sun, 17 Sep 2000 23:01:15 -0400


    Let me add some pointers to Stafano's response:

    - exec() will not fork an new process, which means no new shell, no
controlling terminal or console. You should use Pipes to get/input STDIN,
STDOUT and STDERR (see System, Runtime and Process javadoc). Also, you can
get the integer return code but must be careful not to cause deadlocks
(trying to read a return before the process is complete will through an
exception, you must deal with it to avoid problems).

    - Typically you'll want to execute in a new thread that has some
controls built in (such as the ability to remotely kill in the event of
deadlocks, etc.). Don't block your nice Java program waiting for some shell
script to complete.

            Pat

Stefano <[EMAIL PROTECTED]> wrote in message
news:8pl6br$bd6$[EMAIL PROTECTED]...
> use
>
> Runtime.getRuntime().exec("file to be executed");
>
>
>
> Richard Lim <[EMAIL PROTECTED]> wrote in message
> news:8pketp$ma4$[EMAIL PROTECTED]...
> > I am currently programming a GUI java application that run in kde or
gnome
> > to invoke certain shell command in linux such as chmod, ls, less etc.
> > Is it possible to invoke shell command using java application in linux,
> are
> > there any restrictions.
> > please advice.
> >
> > regards,
> > richard lim
> >
> >
>
>



------------------------------

From: [EMAIL PROTECTED] (Christopher Browne)
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Reply-To: [EMAIL PROTECTED]
Date: Mon, 18 Sep 2000 03:36:31 GMT

Centuries ago, Nostradamus foresaw a time when Alexander Viro would say:
>In article <[EMAIL PROTECTED]>,
>Christopher Browne <[EMAIL PROTECTED]> wrote:
>>Aside from that, it's _not_ as intuitively obvious as it might
>>seem that you win a lot out of trying to push the GUI into the
>>kernel.
>>
>>The _big_, _atrocious_ problem there is that if all this stuff
>>gets pushed into the kernel, that means that:
>>
>>- every time an application touches the screen, there has to be a change
>>  from user mode to kernel mode,
>
>Yes? You know the way to do context switch without getting into the kernel
>mode in process?

The no_kernel_context_switch() call, right?

>>- the set of memory "owned" by the kernel, and thus not able to be
>>  swapped out, grows,
>
>Depends.

Fair.

>>- if anything goes wrong with the GUI code, the kernel may get
>>  toasted because the critical code is running in supervisor mode/
>>  Ring 0.
>
>Now, wait a minute. Pushing X into the kernel is horrible, indeed, but
>X is not the only architecture out there. ISTR seeing you on a certain
>maillist, do you mean that you didn't actually try to run the system? In cases
>of rio and eight-and-half you don't have the window system in the kernel.
>Rendering engine is there, but that's it. Window system acts as a multiplexor
>for graphical console devices and it's in the userland (and pretty small, BTW).
>
>Having the graphical console in the kernel doesn't strike me as something
>too horrible. And yes, it can be easily made network-transparent, so it's
>not localhost-only.

I've successfully had pieces of Plan 9 running, but sadly don't have
a machine that simultaneously has a compatible video card _and_ SCSI
host adaptor.  So it's only gotten through the initial boot process, and
not the full install :-(.  I'll probably build a new machine this fall for
"scratch" stuff; it will doubtless be compatible with Plan 9...

I think I mostly agree with the way that GGI eventually turned out; it
seems to be a quite nice idea to have _some portion_ of the basic control
of graphical hardware sit in the kernel.  The original plan seemed to be
pretty open ended as to what would head into the kernel; the eventual
notion of it basically providing some API for calling into video board
functionality in a coherent way seems to be a pretty good idea.  [Although
I think the things that were irritating about GGI, in the beginning, were
that the developers interacted with kernel folks with somewhat _less_
good grace than the "ReiserFS team," as well as because the original code
was too ugly to survive...  But I digress...]

The notion of queueing together requests via "EvStack," whereby you
have both a set of userspace queues as well as one in the kernel, thus,
quite likely, cutting down on the number of needed context switches,
is an important thing for performance.

I've heard Jim Gettys comment that [not quite quoting] one of the very
important things about X was that it was designed with a view to trying
to minimize the number of context switches.
-- 
[EMAIL PROTECTED] - <http://www.hex.net/~cbbrowne/linux.html>
recursion, n:
        See recursion.

------------------------------

From: [EMAIL PROTECTED] (Alexander Viro)
Crossposted-To: comp.os.linux.x,comp.windows.x
Subject: Re: new windowing system
Date: 18 Sep 2000 00:18:42 -0400

In article <[EMAIL PROTECTED]>,
Christopher Browne <[EMAIL PROTECTED]> wrote:

>I've successfully had pieces of Plan 9 running, but sadly don't have
>a machine that simultaneously has a compatible video card _and_ SCSI
>host adaptor.  So it's only gotten through the initial boot process, and
>not the full install :-(.  I'll probably build a new machine this fall for
>"scratch" stuff; it will doubtless be compatible with Plan 9...

Huh? For terminal/CPU server/standalone you don't need SCSI. Fileserver
kernel wants one, but the normal kernel are quite fine with IDE (well,
modulo usual IDE suckitude, but bad hardware design is OS-independent).
Don't bother with v2, get v3 and be done with that.

-- 
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a better computer" - Dilbert.

------------------------------

From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: large file support
Date: 18 Sep 2000 07:22:19 +0200

>>>>> Alexander Bruns writes:

 > how do i actiate large file support in the 2.4.0-test8-kernel or the 2.2.x
 > kernel??

See also http://www.suse.de/~aj/linux_lfs.html

 > What packages do i have to update excpet the ones in Documentation/Chnages??
You have to recompile glibc with headers from 2.4.0-test8.


 > i now tried on my redhat 6.2 installation the 2.4.0-test8 an was able to
 > crate a tar-file greater  than 2 gb

 > but i cannot compile samba for large file support and the samba-newsgroup
 > told me to setup right sopport for lfs in my linux.
What problems do you have exactly?  Show the error messages.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs [EMAIL PROTECTED]
   private [EMAIL PROTECTED]
    http://www.suse.de/~aj

------------------------------

From: [EMAIL PROTECTED] (David T. Grove)
Subject: loading a .so file within a stream?
Date: Mon, 18 Sep 2000 05:38:32 GMT

Does anyone know how to load a .dll (Win32) and/or a .so (Linux) into
memory and have them loaded as they would if they were embedded
resources or files on disk? I need to create a single-file
distributable bundle that does not require a complete installation of
scripting language(s) onto the user's system. This requires that a
single file contain the .dll and/or .so resources, and that I be able
to have the executable file read itself and use the embedded library
code as a standard .dll or .so file. Since this is crossplatform
(Win32 and Linux) and since I do not want the user to be limited to
having to resort to NT resource editing API's, using pure resources
for this purposes is not possible.

Best help would provide either leads into API functions to do this, or
example code. I know it's possible because there are people doing it
on both platforms.

Please cc [EMAIL PROTECTED]

Thanks

David Grove (pete)
I. S. Senior Architect
Blue Square Group


------------------------------

From: "Quiney, Philip [HAL02:HH00:EXCH]" <[EMAIL PROTECTED]>
Subject: Re: RPM and Tarball Packages Dilema in Red Hat 6.2
Date: Mon, 18 Sep 2000 08:16:26 +0100

Emu wrote:
> 
> So this is what I was told to do in #LinuxHelp
> 
> 1) Either ignore the dependancy alert,
> 2) use --nodeps on RPM command line, which I was unable to find in the
> GnoRPM utility in gnome,
...oh the power of the command line. I have never got on with GUI RPM
tools for this very reason - if you are doing strange things to your
system you need the power of the 'esoteric' command options. Another
option to be aware of is '--force' which will allow you to 'Upgrade' a
package to an earlier or the same version as RPM thinks is installed.


> 3)Leave RPM alone and overwrite files and hope that is does just that and
> does not install new files in a different directory?
> 4)Leave RPM alone and make sure you prefix the configure step.  For Example,
> ./configure --prefix=/usr
> 
> Now step number 4 seems most feasibleto me, but how do I know what directory
> to prefix?  I was told most RPM's are installed in /usr/local so I hope
> prefixing /usr alone would do the job?
> 
I think this will depend on where the RPM controlled files are and what
you set the PATH variable to. The default PATH searches directories in
the following order (for root)
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin

Hence setting the prefix to /usr should in theory get the package built
for /usr/bin - you could create a directory - say /updates and set the
prefix to that - then change the PATH to search this tree first.

Use the 'which' command to find out where the executables in the package
are currently located and go from there.

> My other dilema is what do I do if I want to install a RPM package over a
> Tarball installed package?  I heard you can run 'make uninstall' in the same
> dir you unpacked your source?  I tried that once and got a message that this
> was unsported by this package.  It was 'binutils' Tarball package I think.
> 

If the tarball is built normally the RPM will most likely simply
overwrite the files - a notable exception is KDE - the default is /opt,
RedHat RPMs are built for /usr.

> Any one have any suggestions as to how to proceed any differently from my
> summary thus far?  I am running Red hat 6.2 and told when Red Hat Guiness
> comes out later this month, it will have all the supporting updated
> utilities for the 2.4.0 test kernels.  But that really doesn't help me when
> I want to test the 2.5 or 2.6 test kernels when they come out, I'll be right
> back where I started before  :(
> 
Such is life on the 'bleeding edge' of kernel development I'm afraid...

> I would really appreciate a responce.

HTH

Regards

Phil Q

-- 

Phil Quiney                             CSIP Demonstrator
[EMAIL PROTECTED]              Nortel Networks,
Telephone: +44 (0)1279 402363           London Rd, Harlow,
Fax:       +44 (0)1279 402885           Essex CM17 9NA,
                                        United Kingdom.

"This message may contain information proprietary to Northern 
Telecom so any unauthorised disclosure, copying or distribution
of its contents is strictly prohibited."

------------------------------

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: two drivers of same device
Date: Mon, 18 Sep 2000 10:07:09 +0200

Norm Dresner wrote:
> =

> If there's a module-version of the original driver, you're set.  Enable=

> modules in the kernel and write your own driver as a module too.  Then =
you
> can unload (man rmmod) and load (man insmod) "whenever" you want to.

Not necessarily. Some (if not most) drivers will need to stop the
device(s) because when the driver is unloaded, so will the interrupt
handler. So when you do an "rmmod olddriver;insmod newdriver", the new
driver will not find the device as if it had taken over on-the-fly.

Anil's best bet would be to clone the original driver, _add_ his own
code and provide some means to switch between old and new code.

> Anil Prasad <[EMAIL PROTECTED]> wrote in message
> news:01c01f79$6465c930$7cd4b809@aprasad...
> > but the problem is that i don't want to completely remove the origina=
l
> > driver instead when i want to do something different to the device at=
 that
> > i should remove the original driver dynamically and after my job is o=
ver ,
> > the original driver must be linked into the kernel...

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T. Pratchett)

------------------------------

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: I Need A Shell Script, Or A C Program....
Date: Mon, 18 Sep 2000 10:50:03 +0200

Michael Lauzon wrote:
> =

> I need a shell script to run as root, it will search all the users who =
have MP3s, list there usernames,
> list the MP3s, and delete them if I so desire.  So, what I am looking f=
or is as follows.  A
> program that searches, lists each user with a number before their usern=
ame, which then the program will
> let me choose which user by number (or name), list all the MP3s that th=
e user has and asks me if I want
> to delete them all at once, or one by one.  This could also be a C prog=
ram.  I need this by Monday at the
> earliest, and a week Monday at the latest.

The things you want to look at are
1. file permissions, especially the SUID bit (mknod, chmod are commands
that affect these)
2. the ftw function.

The actual implementation of the program is left as an exercise B-{)

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T. Pratchett)

------------------------------

From: "Meree Tencg" <[EMAIL PROTECTED]>
Subject: kernel update problem
Date: Mon, 18 Sep 2000 16:48:51 +0800

Hi guy,
I had been update kernel 2.2.17 from 2.2.14,
when I booting the system every time, it has some
warning message occur.

warning: /boot/System.map has an incorrect kernel version.

and the system has booting final after 5mins. It will show the
INIT: Id "d2" respawning too fast: disabled for 5 minutes
who can teach me how to take care of this problem.
thank very much.



------------------------------

From: "Diego" <[EMAIL PROTECTED]>
Subject: Problems with ippp0
Date: Mon, 18 Sep 2000 12:06:02 +0200

I'm using isdn in linux.
I use linux-kernel 2.2.17 with the scripts below:
===================================================
## /etc/rc.d/rc.isdn  ##

isdnctrl delif ippp0
isdnctrl addif ippp0
isdnctrl eaz ippp0 my_number
isdnctrl addphone ippp0 out $1
isdnctrl huptimeout ippp0 300
isdnctrl encap ippp0 syncppp
isdnctrl l2_prot ippp0 hdlc
isdnctrl l3_prot ippp0 trans
isdnctrl pppbind ippp0 0
====================================================
## script-connection ##

#!/bin/sh
/etc/rc.d/rc.isdn isp_number
ipppd /dev/ippp0 noipdefault defaultroute name my_login
ifconfig ippp0 up
isdnctrl dial ippp0
====================================================
When I put "./script-connection" then 5 seconds I'm connected... but...
Yesterday I installed kernel linux 2.4.0-test8... and when I started the
script, it said me "ippp0: Resource temporarily unavailable" (in kernel
2.2.17 this error not appears)
and if I put "killall -9 ipppd" and restart the script... then linux give me
this error "unregister_netdevice: waiting for ippp0 to become free. Usage
count = 7" and crashing... (killall -9 ipppd dont work)  :(.

Diego



------------------------------

From: [EMAIL PROTECTED]
Subject: Finding bottlenecks in my app
Date: Mon, 18 Sep 2000 10:09:05 GMT

Hi All,

I have a large application written in C++ on linux, using many shared
libraries, and I am interested in finding the performance bottlenecks.

I have used 'quantify' on Solaris and Windows NT, and I am interested in
knowing if there are any such tools on Linux.

I know about gprof, but if I understand correctly, I will have to recompile
my entire application (including all shared libraries) in order to use this
tool.

Any ideas ?

Thanks,

Noam


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: "Anil Prasad" <[EMAIL PROTECTED]>
Subject: how pci devices use dma
Date: 18 Sep 2000 12:27:59 GMT

hi,
        can anyone tell that how pci devices in linux use dma.


------------------------------


** 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.system) 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-System Digest
******************************

Reply via email to