Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 1999 15:09:19 -0800 (PST)
From:      Alfred Perlstein <bright@wintelcom.net>
To:        "Oleg V. Volkov" <rover@lglobus.ru>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Is there correct way for program to read from itself?
Message-ID:  <Pine.BSF.4.05.9911181506090.12797-100000@fw.wintelcom.net>
In-Reply-To: <19991119013456.A63985@fly.lglobus.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Nov 1999, Oleg V. Volkov wrote:

> On Thu, Nov 18, 1999 at 02:54:21PM -0800, Alfred Perlstein wrote:
> > I think procfs would be even more helpful (unless the 'file' is still
> > done, or is it?)  You guys should have gotten my profs suggestion
> > but someone obviously dropped cc lines.  *sigh*
> > 
> > And Greg is definetly right, you should be able to look around to
> > solve this problem, if the problem is then PATH, then searching
> > the path is what you need to do, but I still think procfs offers
> > what you need.
> > 
> > man 5 procfs.
> 
> Look a this dump:
>    481 ktrace   RET   ktrace 0
>    481 ktrace   CALL  execve(0xbfbfdc9f,0xbfbfdbc4,0xbfbfdbcc)
>    481 ktrace   NAMI  "./hellow"
>    481 hellow   RET   execve 0
>    481 hellow   CALL  getpid
>    481 hellow   RET   getpid 481/0x1e1
>    481 hellow   CALL  open(0xbfbfdb64,0,0)
>    481 hellow   NAMI  "/compat/linux/proc/481/exe"
>    481 hellow   NAMI  "/proc/481/exe"
>    481 hellow   RET   open JUSTRETURN
>    481 hellow   CALL  old.lseek(0xfffffffe,0x688,0)
>    481 hellow   RET   old.lseek -1 errno -9 Unknown error: -9
>    481 hellow   CALL  exit(0x7f)
> 
> I just don't know why lseek fails.

I don't know either, perhaps the source to this errant program
would be helpful?

This looks like a Linux program, just what are you trying to by
opening 'exe'?  You obviously didn't read the procfs manpage, please
do read it and then follow up.

And please stop dropping cc lines on these emails!  other people
trying to help you more than likely won't see these postings and
just repeat the same steps I'm trying to get you to follow.

thank you,
-Alfred



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9911181506090.12797-100000>