Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Replace non-posix use of 'hostname' command with 'uname -n' #1830

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Replace non-posix use of 'hostname' command with 'uname -n' #1830

wants to merge 4 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 18, 2021

Description

This PR replaces the use of the 'hostname' (not accepted by POSIX) command with 'uname -n' (accepted by POSIX).

Features

Issues

The 'hostname' command is not specified by the POSIX standard, thus limiting the portability of the program.

TODO

@ghost
Copy link
Author

ghost commented Jul 18, 2021

Oh okay, uname -n prints the FQDN on OpenBSD so I assumed that was the standard behaviour.

@dylanaraps
Copy link
Owner

@ghost
Copy link
Author

ghost commented Jul 18, 2021

Interesting, thanks!

@ghost
Copy link
Author

ghost commented Jul 19, 2021

Readded 'hostname -f'.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant