Search results

  1. anemos

    Linux app crashing

    It seems that pipe2() is not implemented as part of the Linux Binary Compatibility module. Unless you have access to the source code of the Citrix ICA client, which I really doubt it, there isn't much you can do about it.
  2. anemos

    Kernel Space / User Space bi-directional communication

    One option is the way the Security Event Auditing system is implemented. The kernel sends data to the audit daemon (auditd) via the special device /dev/audit. Any user space program can send audit-related data to the kernel via the audit system calls. Even if user space programs need to send...
  3. anemos

    Dealing with errno

    Actually, it's the carry bit that decides whether errno is needed or not. cpu_set_syscall_retval(struct thread *td, int error) { switch (error) { case 0: td->td_frame->tf_eax = td->td_retval[0]; td->td_frame->tf_edx = td->td_retval[1]...
  4. anemos

    User Log in

    Right after /sbin/init starts until the user gets prompted and authenticated to log in to the system, all this work is handled by user-level processes using the system call interface. So, there's not much you can do kernel-wise. Plus, it is not recommended to place code arbitrarily into the...
  5. anemos

    Page owned by user

    The process owns the page. However, if you look at /usr/include/sys/proc.h there is a member in struct proc struct proc { ... struct ucred *p_ucred; /* (c) Process owner's identity. */ ... } which you can use to extract the data you need.
  6. anemos

    User Log in

    Did you check /usr/src/usr.bin/login/login.c ? Note that it is a userspace process.
  7. anemos

    Set process group

    Yes! You're right! It should be documented though. int setpgid(struct thread *td, register struct setpgid_args *uap) { ... if (uap->pgid == 0) uap->pgid = targp->p_pid; ... I will raise the question to a mailing list.
  8. anemos

    Set process group

    int setpgid(pid_t pid, pid_t pgid); Setting 0 as pgid is absolutely valid. It means that the process ID of the calling process should be used as the process group ID. If pid is 0 then the PID of the caller is used. If pid and pgid are equal, then the calling process becomes a process group...
  9. anemos

    our mod

    I am not a fanatic forumer but as far as I can tell, this place's users, mods, etc are very respectful compared to other fora!
  10. anemos

    Finding no of active users in FreeBSD 5.2.1

    I assume you mean C code, so, have a look at utmp. As you may find out from the links provided by SirDice, w and who, as well as users use /var/run/utmp file to extract this info from the system.
  11. anemos

    How can I make core dump manualy?

    Why? What do you mean beautiful? From a quick "scan" I did in src/sys/kern/syscalls.master I concluded that there is not such a system call in FreeBSD. coredump() is the kernel routine which dumps a process but there is not a system call so you can reach this function. So, as far as I can...
  12. anemos

    How can I make core dump manualy?

    I think that kill(getpid(), SIGSEGV); will do that.
  13. anemos

    Execute external app with sh script

    No, but there is not a problem either with while true; date; do sleep 5; done Good catch anyway!
  14. anemos

    Execute external app with sh script

    Not exactly. The while loop evaluates the condition true; sleep 1.25; as one statement which is always true. This means that sleep 1.25; is executed as long as the loop runs i.e. /home/tiko/a.out returns.
  15. anemos

    Execute external app with sh script

    It seems a little bit odd to me. If your process is run infinitely then the shell blocks itself which means that the loop is run once and it blocks until you break from it (aka SIGINT). If the process is run for some specific amount of time then I will be interested to know how you control the...
  16. anemos

    argument Pass in shell ?

    getopts is pretty much the standard way to do this. Example: #!/bin/sh while getopts e:S:c opt do case "$opt" in e) e_arg=$OPTARG;; S) S_arg=$OPTARG;; c) c_arg=$OPTARG;; \?) echo "Usage [blah blah]"; exit 1;; #Invalid argument esac done The way it...
  17. anemos

    How do you say...... (words with different pronounciations)

    No such thing as A or U in SCSI either.
  18. anemos

    How do you say...... (words with different pronounciations)

    Actually, "SEQUEL" is a remnant from the days back in early '70s. http://www.almaden.ibm.com/cs/people/chamberlin/sequel-1974.pdf
  19. anemos

    Vim backspace delete

    echo "set backspace=start" >> ~/.vimrc
  20. anemos

    How ZFS saved the Apache Foundation

    Very nice of them indeed to share with public their Achilles' Heel as well as the things that helped them recover. Unfortunately, though I happened on the site at that time, I didn't grab a screenshot. �e
Back
Top