mailing list of musl libc
 help / color / mirror / code / Atom feed
* who: /dev/null/utmp: Not a directory
@ 2015-03-28 21:26 John Mudd
  2015-03-28 21:37 ` Rich Felker
  2015-03-29  2:30 ` John Mudd
  0 siblings, 2 replies; 3+ messages in thread
From: John Mudd @ 2015-03-28 21:26 UTC (permalink / raw)
  To: musl; +Cc: John Mudd

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

I got the error when trying to run "who" from musl compiled coreutils
package. I assume there's a good reason but I have to ask...

Why not set _PATH_UTMP to /var/run/utmp instead? Or set it at build time
based on actual utmp location?

./include/paths.h:#define _PATH_UTMP    "/dev/null/utmp"
./include/utmp.h:#define _PATH_UTMP "/dev/null/utmp"

John

[-- Attachment #2: Type: text/html, Size: 491 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: who: /dev/null/utmp: Not a directory
  2015-03-28 21:26 who: /dev/null/utmp: Not a directory John Mudd
@ 2015-03-28 21:37 ` Rich Felker
  2015-03-29  2:30 ` John Mudd
  1 sibling, 0 replies; 3+ messages in thread
From: Rich Felker @ 2015-03-28 21:37 UTC (permalink / raw)
  To: musl

On Sat, Mar 28, 2015 at 05:26:06PM -0400, John Mudd wrote:
> I got the error when trying to run "who" from musl compiled coreutils
> package. I assume there's a good reason but I have to ask...
> 
> Why not set _PATH_UTMP to /var/run/utmp instead? Or set it at build time
> based on actual utmp location?
> 
> ../include/paths.h:#define _PATH_UTMP    "/dev/null/utmp"
> ../include/utmp.h:#define _PATH_UTMP "/dev/null/utmp"

The intent was/is to avoid the creation of a utmp file since musl does
not use or support it. However the error you're reporting has been a
recurring topic so perhaps we should do something different. I'm not
sure what. From the app side, --disable-utmp might be useful if it's
available, since trying to use utmp is not going to do anything
meaningful.

Rich


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: who: /dev/null/utmp: Not a directory
  2015-03-28 21:26 who: /dev/null/utmp: Not a directory John Mudd
  2015-03-28 21:37 ` Rich Felker
@ 2015-03-29  2:30 ` John Mudd
  1 sibling, 0 replies; 3+ messages in thread
From: John Mudd @ 2015-03-29  2:30 UTC (permalink / raw)
  To: musl; +Cc: John Mudd

[-- Attachment #1: Type: text/plain, Size: 848 bytes --]

> The intent was/is to avoid the creation of a utmp file since musl does not
use or support it.

That's okay. I'll just rename the "who" executable and use the rest. I
built coreutils mostly for the "sort" program. I can use the standard "who".

How about change "/dev/null/utmp" to
""/dev/null/musl_does_not_support_utmp". Same for wtmp. And add a comment
where the file is specified in the headers?


On Sat, Mar 28, 2015 at 5:26 PM, John Mudd <johnbmudd@gmail.com> wrote:

> I got the error when trying to run "who" from musl compiled coreutils
> package. I assume there's a good reason but I have to ask...
>
> Why not set _PATH_UTMP to /var/run/utmp instead? Or set it at build time
> based on actual utmp location?
>
> ./include/paths.h:#define _PATH_UTMP    "/dev/null/utmp"
> ./include/utmp.h:#define _PATH_UTMP "/dev/null/utmp"
>
> John
>

[-- Attachment #2: Type: text/html, Size: 1903 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-29  2:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-28 21:26 who: /dev/null/utmp: Not a directory John Mudd
2015-03-28 21:37 ` Rich Felker
2015-03-29  2:30 ` John Mudd

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).