bug-mailfromd


Search for: Advanced

[Bug-mailfromd] How to handle defunct processes?


Hello,

I am using the below function to lookup items from postfix hash tables, but seeing a number of defunct postmap processes. Is there a better way to handle this?

Thanks

func get_postfix_map(string query, string table)
    returns string
do
    number fd
    string cmd "/sbin/postmap -q %query /etc/postfix/%table"

    set fd open("|&2>null: %cmd")
    catch e_eof
    do
      	return ""
    done
    return getline(fd)
done

--
Mehmet Tolga Avcioglu