On 12/15/08 16:26, Danek Duvall wrote:
On Fri, Dec 12, 2008 at 02:02:55PM +0000, Padraig O'Briain wrote:

http://cr.opensolaris.org/~padraig/ips-57698v1/

That should be

    http://cr.opensolaris.org/~padraig/ips-5798-v1/

The change doesn't really fix the underlying problem -- it only works in
the case when the full pathname to packagemanager is used.

If I type packagemanager on the command line sys_argv[0] is /usr/bin/packagemanager.

If I type ./packagemanager on the command line sys_argv[0] is ./packagemanager.
It is only in this second case that we want to use the current directory.

Padraig

You still should have a try block around the getcwd() call, and fall back
to something sane.  Though I'll admit it makes no sense to me why the
working directory is being used at all to figure out where the application
is coming from.  Shouldn't you be searching through $PATH?

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to