Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E016218314 for ; Mon, 17 Aug 2015 09:43:40 +0000 (UTC) Received: (qmail 77486 invoked by uid 500); 17 Aug 2015 09:43:40 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 77434 invoked by uid 500); 17 Aug 2015 09:43:40 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 77424 invoked by uid 99); 17 Aug 2015 09:43:40 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2015 09:43:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BD4B4C0856 for ; Mon, 17 Aug 2015 09:43:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=wandisco.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id MdkfDzoJjp09 for ; Mon, 17 Aug 2015 09:43:38 +0000 (UTC) Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id E697D205B4 for ; Mon, 17 Aug 2015 09:43:37 +0000 (UTC) Received: by wicja10 with SMTP id ja10so65699547wic.1 for ; Mon, 17 Aug 2015 02:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wandisco.com; s=gapps; h=message-id:date:from:organization:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=e94r8UT9dMZJnWTgvUCbmgu3k7g4QYRO4KeJ00EM9QE=; b=jVp9Meo86mDb4odf2jtWj1eWuoW3IZbkLeU+IpM/fYIk+XCFl+aWSlSty9tOZB8REk DYKelpxNWd2C5kY/9q4Jr8g10HFxvJfVCqxpwSrkq0/xU9emtl8NVqoiYNkDdVSvYbW5 xe10XjFbg6A+Wd1xCvgpNb5Ucf8UgXI8kCvU4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=e94r8UT9dMZJnWTgvUCbmgu3k7g4QYRO4KeJ00EM9QE=; b=KdRLVbUySCJIZk70zXRaVibun/N+PuuCKVrgczLFD08Uz8uVqgq3+/7mZTqu4vvaDG m/BqB5bbdMwFFRBlaPMC56ZFqphgUiSCrmJ/iTZc5shpAVZR131bbGg0rWHvdrC1MMLE zKekK1d5dgyLqoGKlFZgH0r7crBszNXFgXgUxdmWTKfC9gCLs2xMz5r2toeefQw6b1Ou bujWXUPER8ykGy77lwvx86UoP5VqJlD9DJwNDCgszyct/4IUmIQktzBdwMB/WVmy7czD CvhhUGWj/r9dNUGMk6JvLCG3xxN6dqkAy0hRhfxtcboTV9P9ZNm7kRUpsxWgmSUzIlKr jHVA== X-Gm-Message-State: ALoCoQn1agF1Na2zS0eEtPZ4zOgRf2CzHtYfFcqQ7y0IHwZ7JfecET7UD7bnZq+sEGs5heJ6aYsD X-Received: by 10.195.12.6 with SMTP id em6mr982659wjd.150.1439804616625; Mon, 17 Aug 2015 02:43:36 -0700 (PDT) Received: from zulu.23.e-reka.si (cpe-46-164-9-209.dynamic.amis.net. [46.164.9.209]) by smtp.gmail.com with ESMTPSA id pu6sm21027773wjc.34.2015.08.17.02.43.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Aug 2015 02:43:35 -0700 (PDT) Received: from zulu.23.e-reka.si (localhost [127.0.0.1]) by zulu.23.e-reka.si (Postfix) with ESMTP id 755F9F5B5021 for ; Mon, 17 Aug 2015 11:43:34 +0200 (CEST) Message-ID: <55D1ACC6.5050209@wandisco.com> Date: Mon, 17 Aug 2015 11:43:34 +0200 From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= Organization: WANdisco User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: dev@subversion.apache.org Subject: Re: svn commit: r1696225 - in /subversion/trunk/subversion: libsvn_subr/stream.c tests/libsvn_ra/ra-test.c References: <20150817094005.5F6BCAC0354@hades.apache.org> In-Reply-To: <20150817094005.5F6BCAC0354@hades.apache.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 17.08.2015 11:40, rhuijben@apache.org wrote: > Author: rhuijben > Date: Mon Aug 17 09:40:04 2015 > New Revision: 1696225 > > URL: http://svn.apache.org/r1696225 > Log: > Following up on r1696222, implement polling on pipes on Windows. > > Note that PeekNamedPipe() also works on unnamed pipes, such as those created > by apr to hook stdin and stdout of subprocesses. > > * subversion/libsvn_subr/stream.c > (data_available_handler_apr): Implement polling on pipes for Win32. > > * subversion/tests/libsvn_ra/ra-test.c > (test_funcs): Remove Windows specific XFail marking. > > Modified: > subversion/trunk/subversion/libsvn_subr/stream.c > subversion/trunk/subversion/tests/libsvn_ra/ra-test.c > > Modified: subversion/trunk/subversion/libsvn_subr/stream.c > URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/stream.c?rev=1696225&r1=1696224&r2=1696225&view=diff > ============================================================================== > --- subversion/trunk/subversion/libsvn_subr/stream.c (original) > +++ subversion/trunk/subversion/libsvn_subr/stream.c Mon Aug 17 09:40:04 2015 > @@ -942,8 +942,9 @@ static svn_error_t * > data_available_handler_apr(void *baton, svn_boolean_t *data_available) > { > struct baton_apr *btn = baton; > - apr_pollfd_t pfd; > apr_status_t status; > +#if !defined(WIN32) || APR_FILES_AS_SOCKETS > + apr_pollfd_t pfd; > int n; > > pfd.desc_type = APR_POLL_FILE; > @@ -973,6 +974,24 @@ data_available_handler_apr(void *baton, > "failed")), > NULL); > } > +#else > + HANDLE h; > + DWORD dwAvail; > + status = apr_os_file_get(&h, btn->file); > + > + if (status) > + return svn_error_wrap_apr(status, NULL); > + > + if (PeekNamedPipe(h, NULL, 0, NULL, &dwAvail, NULL)) > + { > + *data_available = (dwAvail > 0); > + return SVN_NO_ERROR; > + } > + > + return svn_error_create(SVN_ERR_STREAM_NOT_SUPPORTED, > + svn_error_wrap_apr(apr_get_os_error(), NULL), > + _("Windows doesn't support polling on files")); > +#endif > } Interesting solution ... should be in APR, I guess? I'm wondering it's really safe to expect that the socked we got from APR is really an (un)named pipe? -- Brane