Skip to content

ADDED: library(unix): mkfifo/2 - #58

Open
xelxebar wants to merge 1 commit into
SWI-Prolog:masterfrom
xelxebar:add-mkfifo
Open

ADDED: library(unix): mkfifo/2#58
xelxebar wants to merge 1 commit into
SWI-Prolog:masterfrom
xelxebar:add-mkfifo

Conversation

@xelxebar

Copy link
Copy Markdown

Overview

I've seen a few projects using shell/1 to call whatever mkfifo(1) utility exists on the host. This plugs the potential hole.

@JanWielemaker JanWielemaker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Finally, this needs documentation in unix.pl.

Comment thread unix.c Outdated
Comment thread unix.c

if ( !PL_get_chars(Path, &pathname, CVT_ALL|BUF_MALLOC|REP_MB) )
return FALSE;
if ( !PL_get_integer(Mode, (int *)&mode) )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can share with chmod/2 to support symbolic modes?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like sharing mode_bits/2 and file_mode/2 suffices. How would you like to do that? Arguably, since mode handling will now span multiple libraries, it makes sense to expose. If that's the right move, I'd wager they belong in library(unix).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants