ALGOL and MCP Interfaces to POSIX Features
Total Page:16
File Type:pdf, Size:1020Kb
Product Information Announcement o New Release • Revision o Update o New Mail Code Title MCP/AS ALGOL and MCP Interfaces to POSIXȵ Features Programming Reference Manual (7011 8351–002) ȵ This announces a retitling and reissue of the A Series ALGOL and MCP Interfaces to POSIX Features Programming Reference Manual. No new technical changes have been introduced since the HMP 1.0 and SSR 43.2 release in June 1996. This manual describes functions used to obtain certain POSIX-related features in programs not written in the C language. Essentially, each function mimics a C language POSIX function. Most functions call library procedures exported by the MCPSUPPORT library. The POSIX interface was developed by the Institute of Electrical and Electronics Engineers, Inc. (IEEE). • United States customers, call Unisys Direct at 1-800-448-1424. • Customers outside the United States, contact your Unisys sales office. • Unisys personnel, order through the electronic Book Store at http://iwww.bookstore.unisys.com. Comments about documentation can be sent through e-mail to [email protected]. Announcement only: Announcement and attachments: System: MCP/AS Release: HMP 4.0 and SSR 45.1 Date: June 1998 Part number: 7011 8351–002 MCP/AS ALGOL AND MCP INTERFACES ȵ TO POSIX FEATURES Programming Reference Manual Copyright ȴ 1998 Unisys Corporation. All rights reserved. Unisys and ClearPath are registered trademarks of Unisys Corporation. HMP 4.0 and SSR 45.1 June1998 Printed in USA Priced Item 7011 8351–002 The names, places, and/or events used in this publication are not intended to correspond to any individual, group, or association existing, living, or otherwise. Any similarity or likeness of the names, places, and/or events with the names of any individual, living or otherwise, or that of any group or association is purely coincidental and unintentional. NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THIS DOCUMENT. Any product or related information described herein is only furnished pursuant and subject to the terms and conditions of a duly executed agreement to purchase or lease equipment or to license software. The only warranties made by Unisys, if any, with respect to the products described in this document are set forth in such agreement. Unisys cannot accept any financial or other responsibility that may be the result of your use of the information in this document or software material, including direct, special, or consequential damages. You should be very careful to ensure that the use of this information and/or software material complies with the laws, rules, and regulations of the jurisdictions with respect to which it is used. The information contained herein is subject to change without notice. Revisions may be issued to advise of such changes and/or additions. RESTRICTED – Use, reproduction, or disclosure is restricted by DFARS 252.227–7013 and 252.211– 7015/FAR 52.227–14 & 52.227-19 for commercial computer software. Correspondence regarding this publication should be forwarded to Unisys Corporation by addressing remarks to Unisys Corporation, Tredyffrin/Malvern Product Information, N155, 2476 Swedesford Road, Malvern, PA 19355-9700, U.S.A. Comments about documentation can also be sent through e-mail to [email protected]. Unisys and ClearPath are registered trademarks of Unisys Corporation. All other terms mentioned in this document that are known to be trademarks or service marks have been appropriately capitalized. Unisys Corporation cannot attest to the accuracy of this information. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Contents About This Manual .................................................................................... xiii Section 1. Introduction Overview of POSIX Functions ................................................. 1–1 Accessing POSIX Functions in ALGOL Programs .................. 1–1 Accessing POSIX Features with Library Procedures ............. 1–2 Documentation Conventions .................................................. 1–2 Section 2. Reference Information The ALGOL Include File ......................................................... 2–2 Rules for Using Parameters and Results ............................... 2–3 Call-by-reference Integer ........................................... 2–3 Call-by-reference Real ............................................... 2–3 Call-by-value Integer ................................................. 2–3 Call-by-value Real ..................................................... 2–4 EBCDIC Array Input .................................................. 2–4 EBCDIC Array Output ................................................ 2–4 File ......................................................................... 2–5 Integer Array Input ................................................... 2–5 Integer Array Output ................................................. 2–5 Path Definition ......................................................... 2–5 Real Array Input ....................................................... 2–7 Real Array Output ..................................................... 2–7 Structure Array Input ................................................ 2–7 Structure Array Output ............................................. 2–8 Signal Handler Procedure ......................................... 2–9 ERRNO .................................................................... 2–11 Result (Integer or Real) ............................................. 2–18 Parameter Values and Structures ......................................... 2–19 AMODE Parameter ................................................... 2–19 CMD Parameter (FCNTL) ........................................... 2–20 CMD parameter (SEMCTL) ........................................ 2–21 DISP Parameter ....................................................... 2–22 FLOCK Structure ...................................................... 2–23 GROUP Structure ..................................................... 2–24 HOW Parameter ....................................................... 2–25 INFO Parameter ....................................................... 2–26 INTARG Parameter (FCNTL) ....................................... 2–27 MODE Parameter ..................................................... 2–28 7011 8351–002 iii Contents MCPSTAT Structure .................................................. 2–29 NAME Parameter (PATHCONF) ................................... 2–30 NAME Parameter (SYSCONF) ..................................... 2–31 OPTION Parameter (CLOSE) ...................................... 2–32 OPTION Parameter (OPEN) ........................................ 2–33 OPTION Parameter (WAITPID) .................................... 2–35 PASSWD Structure ................................................... 2–36 PID parameter (KILL) ................................................. 2–37 PID Parameter (WAITPID) ........................................... 2–38 SEMBUF Structure .................................................... 2–39 SEMFLG Parameter .................................................. 2–40 SEMID_DS Structure ................................................. 2–41 SIG Parameter ......................................................... 2–42 SIGACTION Structure ................................................ 2–44 SIGINFO_T Structure ................................................. 2–45 STAT Structure ........................................................ 2–46 STATUS Parameter ................................................... 2–48 TMS Structure .......................................................... 2–49 UTSNAME Structure ................................................. 2–50 Section 3. POSIX Functions in ALGOL ACCESS .................................................................................. 3–2 ALARM .................................................................................... 3–3 CHDIR ..................................................................................... 3–4 CHMOD ................................................................................... 3–5 CHOWN ................................................................................... 3–6 EXECVE .................................................................................. 3–7 FORK ...................................................................................... 3–9 GETCWD ................................................................................. 3–10 GETEGID ................................................................................. 3–11 GETEUID ................................................................................. 3–12 GETGID ................................................................................... 3–13 GETGRGID .............................................................................. 3–14 GETGRNAM ............................................................................ 3–15 GETGROUPS ........................................................................... 3–16 GETLOGIN .............................................................................. 3–17 GETPGID ................................................................................. 3–18 GETPGRP ................................................................................ 3–19 GETPID ................................................................................... 3–20 GETPPID ................................................................................