APUE: checklist. Iwillturnbacktoanswerthesequestions

Source: Internet
Author: User
Ifyouhappentoknowthese, pleasehelptoanswer. Whatisunixsockets? Onlyusedtoconnectlocalserver? JDBCstatementpreparedStatement to get the group ID using getgid. How can I get the additional group ID? When opening an Open file, if the O_APPEND flag is used

If you happen to know these, please help to answer. What is unix sockets? Only used to connect local server? JDBC statement preparedStatement: getgid is used to obtain the group ID. How can I obtain the additional group ID? When opening an Open file, if the O_APPEND flag is used

If you happen to know these, please help to answer.

  1. What is unix sockets? Only used to connect local server?
  1. JDBC statement & preparedStatement
  1. If getgid is used to obtain the group ID, How can I obtain the additional group ID?
  1. When opening an Open file, if the O_APPEND flag is used, when writing a file, the file will be located at the end each time, and then the write operation will be executed. The entire process is an atomic operation.
  1. Open (pathename, O_CREAT | O _ EXCL): checks whether the file exists. If it does not exist, it is created. If it exists, an error is returned, which is also an atomic operation.
  1. If the user xiaoxin wants to delete A root user's file A, does xiaoxin need the read and write permissions of file? No, but xiaoxin must have the write and execution permissions for the parent directory of File.
  1. Turn on the Set User ID location (how can we know who set the user ID ?)
    1. Chown root a. out
    2. Chmod u + s a. out
    3. Ls-al a. out
    4. -Rwsrwxr-x 1 root
  1. You can use the access function to check whether a user can access a file. Instead, you can use open to open a file and check whether the user has access permissions.
  1. When you use ls to display the File Permission, s indicates that the user or group ID bit is set and the execution bit is set. S indicates that the user or group ID bit is set and the execution bit is canceled.
  2. After a sticky bit is set for a directory, only users with write permission for the Directory meet one of the following conditions can delete or rename the files in the directory.
    1. Own this file
    2. Own This Directory
    3. Superuser
  1. Use the root permission to create the tmp directory. Anyone has the read/write permission and sets the sticky bit, in this way, any user can create files in this directory without worrying about others accidentally deleting their own files.
  2. A hard link is actually a denty pointing to the target, increasing the link count of the target. Hard links are limited to the same file system, and most systems do not allow hard links to directories. The purpose is to avoid nesting.
  3. To delete a hard link, you must have the write and execution permissions (why) for the directory where the target file is located ).
  4. Good idea: If you want to create a temporary file, but want to ensure that the temporary file can still be automatically deleted when the system crashes, you can use unlink. After the program calls unlink, only dentry is deleted. The content indicated by dentry is deleted only when the program exits.
  5. File time:
    1. Last Data Access time ls-lu
    2. Last data modification time ls-l
    3. Last inode modification time ls-lc
  1. If a process fock a sub-process, but does not want it to wait for the sub-process to terminate, and does not want itself to be in a dead state to know that the parent process is terminated, the parent process fock the sub-process first, then wait for the child process to exit. At this time, the child process continues to fock the child process, the child process executes and calls exec, and the child process exits immediately, making the child process an orphan process and adopted by the init process. Dad is dead. Grandpa does not need to raise his grandson ~~
  2. How does a child process know that the parent process exits? Call getppid. If the parent process exits, the returned value is 1 and the init process ID.
  3. Close-on-exec
  4. Can the root user change the user ID set for iwssd (owner = iscan) to root? When xiaoxin logs on to the shell and runs iwssd, can iwssd be executed as root?
  1. How to use a control terminal when the standard input and standard output are redirected to a file? /Dev/tty Daemon has no control terminal. An error occurs when the device is enabled.
  2. After the network is disconnected, all processes in the modified session will be shut down. After detecting the terminal, the system sends a hang-up signal to shell (session control process) and shenll closes all sub-processes. (Yes ?)
  3. Can a process call exec multiple times?
  4. When you call fctrl to add a record lock to a file, improper operations will lead to a deadlock. the Linux kernel automatically checks whether a deadlock has occurred. If a deadlock has occurred, the fctrl call of a process will fail, the caller is notified through the error code. Relly nice

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.