def METHOD_NAME(pids, path, url, headers):
    data_r, data_w = os.pipe()
    curl_opt = get_curl_options(headers) + ["--upload-file", "-", url]
    pids.add(fork_exec(
        DD.cmd,
        DD.name,
        "bs=2M",
        "if=%s" % path,
        dup2args=(data_w, 1),
        closefd=(data_r,)))
    pids.add(fork_exec(
        CURL.cmd,
        CURL.name,
        *curl_opt,
        dup2args=(data_r, 0),
        closefd=(data_w,)))
    os.close(data_r)
    os.close(data_w)