bugGNU Octave - Bugs: bug #45054, mkfifo: Document that MODE is in...

 
 

bug #45054: mkfifo: Document that MODE is in base 10

Submitter:  None
Submitted:  Fri 08 May 2015 07:45:51 AM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 17 May 2015 05:09:02 PM UTC, comment #3: 

I documented the decimal argument to mkfifo on the stable branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/b597bd161a5f).

On the development branch, I changed mkfifo to use an octal argument which matches the UNIX function (http://hg.savannah.gnu.org/hgweb/octave/rev/d9f35ceff9e1).

Rik <rik5>
Group administrator
Tue 12 May 2015 12:19:32 AM UTC, comment #2: 

Rather than document it, shouldn't we change the behavior of mkfifo to treat the input mode argument as octal?  This would more closely follow the relevant system library call, and it is also the way we handle arguments in chmod where the mode is interpreted as octal.

Rik <rik5>
Group administrator
Fri 08 May 2015 10:26:18 AM UTC, comment #1: 

Andreas explained this recently to a user on stackoverflow and provided an example. Maybe it could be reused to improve mkfifo help text

https://stackoverflow.com/questions/30110340/mkfifo-in-gnu-octave

Carnë Draug <carandraug>
Group Member
Fri 08 May 2015 07:45:51 AM UTC, original submission:  


 -- Built-in Function: mkfifo (NAME, MODE)
 -- Built-in Function: [ERR, MSG] = mkfifo (NAME, MODE)
     Create a FIFO special file named NAME with file mode MODE


I think the doc should mention that MODE is interpreted as base10 integer so the user has to call


mkfifo (NAME, base2dec ("644", 8))


To get the expected "prw-r--r--" modestr. Perhaps it could also mention that the umask is also used.

man 3 mkfifo:

mkfifo()  makes a FIFO special file with name pathname.  mode specifies the FIFO's permissions.  It is modified by the process's umask  in  the usual way: the permissions of the created file are (mode & ~umask).


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-17 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code